Tech Support Forum banner
Status
Not open for further replies.

[SOLVED] Link a Cell in Excel to Outlook Calendar Appointment (2007)

27K views 8 replies 3 participants last post by  Smilinsue  
#1 ·
I have an excel file and I would like to create a column that will allow the user to click in the cell and open up an appointment in an outlook calendar. Is this possible to do? I am not familiar with VBA so if I have to go that route it would be very helpful if I could get some code examples.

thank you!

Heather
 
#3 ·
Re: Link a Cell in Excel to Outlook Calendar Appointment (2007)

Hey all,

It can be done with VBA. Its just a matter of designing it. You say you want to click on a cell in a particular column and open an appointment in Outlook. How are you pointing that cell to the specific appointment?

Are you looking to search based off date? Specific name of the appointment? etc

What information is in your Excel file?

Pointing Excel and Outlook at each other is not very complicated, but getting into the nitty gritty can be. If you can be more specific we can likely figure something out.

HTH,

Robert D. Specian Jr.
 
#4 ·
Re: Link a Cell in Excel to Outlook Calendar Appointment (2007)

I want to have a cell in excel that has a hyperlink that opens up an outlook invite to the person who clicks on it. I have seen it happen but don't know how they did it. The row explains what the class is about and that cell's hyperlink invites you to attend it. Is that a macro?
 
#5 ·
Re: Link a Cell in Excel to Outlook Calendar Appointment (2007)

Hi Robert,

I will link to the OUTLOOK appointment based on (1) Date and (2) Subject.

My excel file has a bunch of columns that describe classes, including Date and Subject (which is the name of the class).

The point is to allow the user to click on a cell containing class date and then the OUTLOOK appointment for that date (and subject=class name) will automatically open up.

Please let me know if I have given you enough information.

I appreciate your help with this project very much!

Heather
 
#6 ·
Re: Link a Cell in Excel to Outlook Calendar Appointment (2007)

Hey,

Both of these things can be done using a macro, I have a busy day at work today because a mayorial candidate is coming around to see how/what we are doing. I should have something for both of you this weekend. If anyone else would like to write it, feel free = )

Thanks,

Robert D. Specian Jr.
 
#8 ·
Re: Link a Cell in Excel to Outlook Calendar Appointment (2007)

Thanks for your patients! I had a lot come up this weekend and hadn't had the time to get back to it. Here is a macro that should work for you Heather:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim OutApp As Object
Dim OutNameSpace As Namespace
Dim Appt As AppointmentItem
Dim col As Integer
Dim rw As Integer

col = Target.Column
rw = Target.Row

'this denotes which column the link is in 3=C
If col = 3 Then
If Len(ActiveSheet.Cells(rw, col - 1)) > 1 Then
If Len(ActiveSheet.Cells(rw, col - 2)) > 1 Then
 
Set OutApp = New Outlook.Application
Set OutNameSpace = OutApp.GetNamespace("MAPI")

Set Appt = OutApp.CreateItem(olAppointmentItem)

Appt.Subject = ActiveSheet.Cells(rw, col - 1).Value
Appt.Start = Appt.Start = ActiveSheet.Cells(rw, col - 2).Text
Appt.Duration = 60
'Appt.Save
Appt.Display

End If
End If
End If
End Sub
This will go in the Worksheet you want to use to create the Appointment. The information it is based off off is Date and Subject... I set the Duration to 1 hour.
The date should be in this formate: 8/11/2010 9:00:00 AM
This is all also based on the link being in column C, Subject the column prior (B), Date/Time the column before Subject (A).


Smilinsue,

You can use this:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim OutApp As Object
Dim OutNameSpace As Namespace
Dim Appt As AppointmentItem
Dim col As Integer
Dim rw As Integer

col = Target.Column
rw = Target.Row

If col = 3 Then
 
Set OutApp = New Outlook.Application
Set OutNameSpace = OutApp.GetNamespace("MAPI")

Set Appt = OutApp.CreateItem(olAppointmentItem)

Appt.Subject = "My Subject here."
Appt.Start = #8/11/2010  9:00:00 AM#
Appt.Duration = 60
'Appt.Save
Appt.Display

End If
End Sub
HTH,

Robert D. Specian Jr.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.