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.
----
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.