![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 -- Dana |
Ads |
#2
|
|||
|
|||
![]()
Well, I think I found the problem. I just tried to add an new appointment
manually, and could not. I couldn't add an appointment, or modify any appointments in my Calendar. Ahhh! Some of the code must have corrupted the calendar. Anyway, I rebooted the computer, and the sample code below works as expected. Something in my program must be corrupting the Calendar. Anyway, thanks again. -- Dana Win XP & Office 2003 "Dana DeLouis" wrote in message ... 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 -- Dana |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 GPO question | Courtney R | Outlook - Installation | 1 | March 4th 06 11:12 PM |
Screen resolution change in outlook 2003 text size question | Andym | Outlook - Installation | 2 | March 2nd 06 07:17 PM |
Stupid question | SgtRich | Outlook - General Queries | 1 | February 11th 06 08:12 PM |
Question | Jeremiah | Outlook - General Queries | 3 | January 31st 06 02:33 AM |
SBS 2003 exchange question - Outlook problem | dimon | Outlook - General Queries | 1 | January 11th 06 05:11 AM |