Thanks for the info. I thought this was the case, however, I was
searching
for answers and before I posted here I found something very similiar here:
http://forums.asp.net/p/1098760/1665135.aspx#1665135 and it did not
mention
the fact that MS does not support this.
I can't help that... Quoted directly from the two MSDN articles I gave you:
"All current versions of Microsoft Office were designed, tested, and
configured to run as end-user products on a client workstation. They assume
an interactive desktop and user profile, and do not provide the level of
reentrancy or security that is necessary to meet the needs of server-side
components that are designed to run unattended.
Microsoft does not currently recommend, and does not support, Automation of
Microsoft Office applications from any unattended, non-interactive client
application or component (including ASP, DCOM, and NT Services), because
Office may exhibit unstable behavior and/or deadlock when run in this
environment.
If you are building a solution that runs in a server-side context, you
should attempt wherever possible to use components that have been made safe
for unattended execution, or find alternatives that allow at least a part of
the code to run client-side. If you choose to use an Office application from
a server-side solution, you will find that it lacks many of the necessary
capabilities to run successfully, and you will be taking risks with the
stability of your overall solution."
"We do not recommend or support Automation to a Microsoft Office application
from an unattended user account."
"Caution Automation of any Office application from an unattended,
non-interactive user account is risky and unstable. A single error in code
or configuration can result in a dialog box that can cause the client
process to stop responding (hang), that can corrupt data, or that can even
crash the calling process (which could bring down your Web server if the
client is ASP).
Warning Office was not designed, and is not safe, for unattended execution
on a server. Developers who use Office in this manner do so at their own
risk."
It doesn't get much plainer than that... Whether you choose to believe or
not what Microsoft say in the above quotes is, of course, your choice...
I have also found many examples from other MVPs using similar code in C#
as well.
Again, there's nothing I can do about that...
I would not prefer to purchase an outside component
The third-party component I suggested is guaranteed to work because it is
specifically designed to work without Microsoft Office...
is that the only answer?
IMO, yes... You can beat your head against a brick wall trying all sorts of
various DCOM configurations, user impersonation or whatever and you might
get it to work for a while...
Or you can purchase the Aspose solution which will work straight out of the
box, and then you can forget about it...