MS-Word in VB.Net

G

Guest

I have a VB.Net program in which I would like to call MS-Word to open a
template. I followed the instructions here
http://support.microsoft.com/default.aspx?scid=kb;en-us;316383 but am
encountering a few problems.
#1) My 'Imports' statement only allows Microsoft.Office.Core, and not
"Microsoft.Office.Interop.Word", as shown in the example.
#2) When executing my solution, the following error is generated:

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

The program errors on the statement: Private WordApp As New
Word.ApplicationClass

Can anyone shed any light to the problem? I have imported the Word 10.0 COM
object into my references.
 
G

Guest

Thomas Scheidegger said:
Hi



http://support.microsoft.com/kb/257757/en-us


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

But if you read further, Microsoft does have workarounds. I have been
reading up on the workarounds, and they include how NOT to set up Word as an
anonymous user, which is what causes problems and potential crashes. It was
brought to my attention last week that .Net can be used to build Word
Documents or even an Adobe Document. I am looking for someone who has
experience with this process.
 
Joined
May 4, 2006
Messages
1
Reaction score
0
You can do it your way too if you grant DCOM permissions

Hello,

You can do what you are trying to do and get rid of the errors if you enable in the Control Panel Admin, Component Services, DCOM Launch Word Document for the user .....IUSR

Regards,

Hackadelic
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top