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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Outlook 10.0 Object Library - Setup on Client

Status
Not open for further replies.

a75537

Programmer
Feb 26, 2003
25
CA
I've included the Micorsoft Outlook 10.0 Object Library in my project and everything works fine on my development PC. The code is really simple - just opening Outlook with an attached file:

----
Dim OLApp As New Outlook.Application
Dim objMailItem As Outlook.MailItem
Dim objAttachment As Outlook.Attachment

OLApp = CreateObject("Outlook.Application")
objMailItem = OLApp.CreateItem(Outlook.OlItemType.olMailItem)

objMailItem.Subject = "Audit Report"
objAttachment = objMailItem.Attachments.Add("c:\Audit.pdf")
objMailItem.Display()
----

The problem is when I try to run this code on the client PC - I get an error "COM Object with CLSID is either not valid or not registered". The .Net Framework is installed on the client - and I've rebuilt the application after including the Outlook reference. Does anyone know what I'm missing?

Thanks.
 
To use the outlook object lib you will need outlook installed on the client PC as this contains all of the DLL files required. Just including the interop is not enough.
 
Outlook is installed on the client PC - but I think you pointed me in the right direction. My development PC has Outlook 2002, while the client PC has Outlook 97. I'm guessing I need to use a different object lib for Outlook 97?

Thanks.
 
Yes, that will be the problem. As a workaround you could install office 97 on your machine and use the DLL from that to do all you need?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top