cancel
Showing results for 
Search instead for 
Did you mean: 

Call a virtual MS Outlook via OLE

Former Member
0 Kudos

Hi Guys,

I need help on calling MS Outlook via OLE. It is MS Outlook 2010. The li_rc = oleOutlook.ConnectToNewObject("Outlook.Application") returns -2 which indicates "Class name not found". I also tried li_rc = oleOutlook.ConnectToNewObject("Outlook.Application.14"), the same value returned (-2).

When outlook is installed locally, then the code runs fine. How do we call if it's a virtual application (using APP-V).

Thanks,

Neil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Don't know APP-V but if it simulates a Virtual host, you can

try to use ConnectToNewRemoteObject (hostname,"Outlook.Application")

Regards.

Abdallah.

Former Member
0 Kudos

Thanks Abdallah. It's one of the challenge for me to find out the hostname. The client is a remote client and their IT Infrastructure is kind of security tight. The hostname could also change at any point in time as per their IT Architecture. So, it's kind of hard to figure out a solution.

former_member190719
Active Contributor
0 Kudos

App-V isolates the running application in a sandbox.  You can't talk to it.  You should look at other means (e.g., SMTP) to send email if that's what you were using Outlook for.

Former Member
0 Kudos

Thanks Bruce. The requirement is to just display the Outlook Client window with a pre-attached document but not send the email yet. The user will send the email manually as they still have to type more texts on it. And they also want to have a copy of the email on their Sent folder. I'm working for three different clients with different environments. In one client the code is working fine, on the other two, they're having issues.