|
-
May 12th, 2011, 12:05 PM
#1
Thread Starter
PowerPoster
outlook automation issues - works fine in one app but not the other on the SAME PC
This is a weird issue. I have a VB 2008 where I need to do some Outlook automation (display a user's calendar, send email, etc.). I am using late binding, i.e.:
Dim olApp As Object
olApp = CreateObject("Outlook.Application")
Everything works fine on my development PC.
However, on the user's computer, I have the following scenario:
Early on, I created a test app because I was using some functionality that I had not used before (some calendar and appointment stuff). I had the user run the test app on her PC. This was just a bare-bones app, and I am assuming she ran it off of her desktop. It worked fine.
So later, I incorporated the same functionality / same code into the main app I am developing for them. One thing, I don't know if it makes any difference due to permissions or what have you, is that the main app has an installer (fairly basic using INNO Setup), and this installs the app into the "Program Files" directory. When she tries to run a function that uses Outlook automation, she gets the dreaded "Cannot create ActiveX component" error.
I could understand if this worked OK on one person's computer but not an other, but the weird thing here is that we have two apps (the tester and the main) running on one computer. And the OL automation works fine in the tester, but not in the main.
Another thing, I don't know if it is at all relevant, but the app also automates Word and Excel using late binding, and there are no problems with those at all.
So - if anyone could shed some light on this issue, I would be extremely appreciative ...
ADDENDUM to my original post:
I had the user copy the application folder from Program Files to the desktop, and run the app from there - and all of a sudden the Outlook automation features were working! This leads me to believe that some sort of permissions issue was coming into play. Any ideas on how to fix this restriction? (The user's PC is running Win 7 with Office 2007.)
Last edited by BruceG; May 12th, 2011 at 12:28 PM.
Reason: new evidence
"It's cold gin time again ..."
Check out my website here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|