D
Dana DeLouis
Hello. I'm studying Outlook Programming for the first time (Sue Mosher's
book). I was able to add an Appointment to the calender the other day, but
now it's not working.
Can anyone spot the why I'm getting an "'Application-defined" error. I'm
running this from Excel, with a vba library reference set to Outlook 11.
Outlook 2003, IM only mode also.
Thanks for any insight. I just don't see why it's not working now. :>(
Sub Testing()
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim objAppt As Outlook.AppointmentItem
Set olApp = Outlook.Application
'Application-defined or object-defined error
Set objAppt = olApp.CreateItem(olAppointmentItem)
'However, this is ok...
Set objMail = olApp.CreateItem(olMailItem)
End Sub
book). I was able to add an Appointment to the calender the other day, but
now it's not working.
Can anyone spot the why I'm getting an "'Application-defined" error. I'm
running this from Excel, with a vba library reference set to Outlook 11.
Outlook 2003, IM only mode also.
Thanks for any insight. I just don't see why it's not working now. :>(
Sub Testing()
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim objAppt As Outlook.AppointmentItem
Set olApp = Outlook.Application
'Application-defined or object-defined error
Set objAppt = olApp.CreateItem(olAppointmentItem)
'However, this is ok...
Set objMail = olApp.CreateItem(olMailItem)
End Sub