mrblack
03-27-2009, 02:29 PM
HI,
I was wondering if I could do some basic error handling before declaring any public variables. I have written some code to create Outlook appoinment items from Excel cell values. It starts off wth declaring the public variables:
Public myOlApp As Outlook.Application
Public myItem As Outlook.AppointmentItem
But to do this the system on which the script runs must have a reference to the Outlook 11.0 object library or the compiler will throw an error message like "User-defined datatype not defined".
Is there anyway to check (and alert the user) wether the library is referenced or not? Moreover, is it possible to reference the library run-time?
I was wondering if I could do some basic error handling before declaring any public variables. I have written some code to create Outlook appoinment items from Excel cell values. It starts off wth declaring the public variables:
Public myOlApp As Outlook.Application
Public myItem As Outlook.AppointmentItem
But to do this the system on which the script runs must have a reference to the Outlook 11.0 object library or the compiler will throw an error message like "User-defined datatype not defined".
Is there anyway to check (and alert the user) wether the library is referenced or not? Moreover, is it possible to reference the library run-time?