Thanks Sergey
Will do:)
>
>This generates a syntax error when I am defining my class
>>
>>ADD OBJECT olApp As "outlook.application">
>You cannot add automation server as an object to the class. Anyway, it's important only for visual controls to be added to the container this way. Also not all controls can be added to all containers.
>
>
>This does not
>>
>>public olApp As "outlook.application">
>It doesn't create object but declares variable olApp of type "outlook.application" for Intellisense to show it's methods and properties when you type 'olApp.'.
>
>You can add property, say oOutlook, to your class and in the Init of the class create instance of outlook server.
>This.oOutlook = = CREATEOBJECT("Outlook.Application")
After that you can reference it the same way as if it was created with ADD OBJECT.