Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declaring libraries

Status
Not open for further replies.

Peepain

Programmer
May 15, 2002
43
AR
Hi,

I need to "Dim O As New Outlook.Application" but I can't find the way to do it. It shows error everytime.

I just declared "Microsoft Outlook View Control" in the references but it still doesn't work.

Somebody could help me please..

Thanks
 
You need to add Microsoft Outlook x.x Object Library to your references.
 
Thanks, I could do it. As I can imagine this will work only for the outlook version that I have prepared the application with?

Thanks again.
 
You could leave the reference out of your application and then do the following.

Code:
Dim otlApplication As Object

Set otlApplication = CreateObject("Outlook.Application")

This will let you use whatever version you have installed on the computer. The drawback is that without the reference, you don't have use of the autocomplete of the properties and methods when coding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top