Outlook automation - Error 80080005 server execution failed

N

NigelGomm

Office 2007, WIndows Vista.

I'm getting the above error when i try

loOutlook = CREATEOBJECT("Outlook.APPLICATION")

when outlook is already running. Works fine when outlook is not running.

Not sure what triggered this.... i'm working on a project where i've been
doing this 20 times a day for over a month and just yesterday it started
failing.

I have 'repair'ed the installation and also completely uninstalled and
reinstalled MS Office. No joy.



One oddity i have noticed is that the LocalServer32 registry entry for the
Outlook CLSID has the following path

vUpAV5!!!!!!!!!MKKSkOUTLOOKFiles>tW{~$4Q]c@zPX6FxaTO5

changing it to the correct path isn't helping (but many other outlook
related CLSIDs also have that path)

Help...


thanks

Nigel
 
N

NigelGomm

ok... the LocalServer32 path is a red herring.. i just checked another
system and it is the same there (but they are working ok)

n
 
J

Jialiang Ge [MSFT]

Hello Nigel

From your post, my understanding on this issue is: you wonder why it
reports error 80080005 at the sentence CreateObject("Outlook.Application")
when Outlook 2007 is already running. If I'm off base, please feel free to
let me know.

The problem here is that Outlook keeps only a single process when it is
running. So if Outlook is running in low rights and another process tries
to CoCreate an instance of Outlook from within a High rigthts process,
Vista will not allow it. (This issue does not exist in other Office
applications, like excel, because they create a new instances of excel.exe
each time someone CoCreates them). As you found, the workaround would be to
automate Outlook from within a process that has the same rights as the
outlook.exe process. (i.e. if Outlook is running as low rights then the
other process needs to be running at low rights, and same goes for high
rights). If Outlook is originally not running, then the outlook.exe process
will be created with the same rights as the process that CoCreated it.

As for the key LocalServer32/LocalServer32 (Type: REG_MULTI_SZ), I need to
consult it with Office product team because the key value is never
documented. I will get back to you as soon as possible.

Please let me know if you have any other concerns, or need anything else.

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

NigelGomm

ah

that makes sense because i increased the rights of the calling program at
about the same time but never made the connection.... well, not in that
sense anyway.

That solves my problem because, in the wild, the calling program will run as
a normal user.

thanks

nigel
 
J

Jialiang Ge [MSFT]

Hello Nigel

As for the key LocalServer32/LocalServer32 (Type: REG_MULTI_SZ), they are
referred to as a Windows Installer descriptor and is used for proper
resiliency, repair, and certain install-on-demand (advertisement)
situations for Installer based products (which Office is one of).

Here are a few references to it in Microsoft KB and the Installer MSDN
documentation:
http://msdn2.microsoft.com/en-us/library/Aa371842.aspx
http://support.microsoft.com/kb/243630/

Please let me know if you have any other concern or need anything else.

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

NigelGomm

ok.. thanks for that.

I have just realised that this will cause a problem in the wild because
there's a problem with the manifest when i distribute my application; I
can't find reference to an execution level such as "standardUser".

When launched by an installer (which has to run as admin) my app (with the
requested execution level 'asInvoker") will run as Admin. So on first run my
app will fail when it tries to create an outlook object.

In the short term i can remove the "launch application now" checkbox from
the installer's dialog but i can't believe it was intended that an
application running as admin could NEVER launch an exe as a standard user.

did i miss something?
 
J

Jialiang Ge [MSFT]

Hello Nigel,

If I understand it correctly, you mean your current logon user is a
standard user (not an admin). The user opens his Outlook with his stardard
user right, then run the setup project as an admin user. When the setup is
finished, the user clicks on the "Launch application now" button to start
the application process. Because the process is created in the setup
process which is run under admin right, the new process with
'CreateObject("Outlook.Application") would also run as admin and it makes
the problem.

I discussed it with some experts on 'setup' in our managed newsgroup
support team, they told me that it may be possible to launch the
application as current logon user even if the setup process is run as
'Admin' right, by customizing the script of "launch application now". Would
you mind posting the question in microsoft.public.vsnet.setup or
microsoft.public.platformsdk.msi newsgroup so that you will get the most
qualified pool of respondents, and other partners who the newsgroups
regularly can either share their knowlege or learn from your interaction
with us? Please note that the two newsgroups above are also managed by
Microsoft. Support Engineers from Microsoft will work with to resolution.
Thank you for your understanding.

Have a nice day!

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Nigel,

If you have further assistance for this issue, please feel free to let me
know. I will be more than happy to be of assistance.

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Joined
Oct 28, 2020
Messages
1
Reaction score
0
Hello Nigel

From your post, my understanding on this issue is: you wonder why it
reports error 80080005 at the sentence CreateObject("Outlook.Application")
when Outlook 2007 is already running. If I'm off base, please feel free to
let me know.

The problem here is that Outlook keeps only a single process when it is
running. So if Outlook is running in low rights and another process tries
to CoCreate an instance of Outlook from within a High rigthts process,
Vista will not allow it. (This issue does not exist in other Office
applications, like excel, because they create a new instances of excel.exe
each time someone CoCreates them). As you found, the workaround would be to
automate Outlook from within a process that has the same rights as the
outlook.exe process. (i.e. if Outlook is running as low rights then the
other process needs to be running at low rights, and same goes for high
rights). If Outlook is originally not running, then the outlook.exe process
will be created with the same rights as the process that CoCreated it.

As for the key LocalServer32/LocalServer32 (Type: REG_MULTI_SZ), I need to
consult it with Office product team because the key value is never
documented. I will get back to you as soon as possible.

Please let me know if you have any other concerns, or need anything else.

Sincerely,
Jialiang Ge ((e-mail address removed), remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks, this is the best answe, It helped me a lot.
 
Joined
Jul 21, 2021
Messages
1
Reaction score
0
Hello Nigel,

If you have further assistance for this issue, please feel free to let me
know. I will be more than happy to be of assistance.

Sincerely,
Jialiang Ge ((e-mail address removed), remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Hi Team,

Can I fix this problem by changing some settings of outlook or changing the rights of outlook? Because I don't have admin rights.

Please let me know if its possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top