I'm trying to write a sub to automatically add appointments to my calendar. I've got this from the help file, which compiles but does not appear on my calendar (I'm using an exchange connection but have only one calendar) Can someone tell me what I'm doing wrong?
Code:Sub AddBreakfast() Dim myOlApp As New Outlook.Application Dim myItem As Outlook.AppointmentItem Set myItem = myOlApp.CreateItem(olAppointmentItem) With myItem .Subject = "Breakfast" .Location = "Manor" .Start = #6/20/2009 7:50:00 AM# .Duration = 20 End With End Sub
Last edited by timbim; 06-19-2009 at 04:18 PM.
You need to add
prior to End WithCode:.Save
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thank you!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks