HighTechTalks DotNet Forums  

MS-Word in VB.Net

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss MS-Word in VB.Net in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Gary@FAA
 
Posts: n/a

Default MS-Word in VB.Net - 09-20-2005 , 12:21 PM






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...b;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.

Reply With Quote
  #2  
Old   
Thomas Scheidegger [MVP]
 
Posts: n/a

Default Re: MS-Word in VB.Net - 09-21-2005 , 06:30 AM






Hi

Quote:
ASP.NET

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





--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/




Reply With Quote
  #3  
Old   
Gary@FAA
 
Posts: n/a

Default Re: MS-Word in VB.Net - 09-21-2005 , 09:57 AM





"Thomas Scheidegger [MVP]" wrote:

Quote:
Hi

ASP.NET


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





--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/



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.


Reply With Quote
  #4  
Old   
DC
 
Posts: n/a

Default Re: MS-Word in VB.Net - 10-06-2005 , 12:54 PM



if you are targetting Office 2003, you can use WordML . You can create an
XML document on the server side, fill it with data, and drop it down to the
client. The client will open it in Word 2003. No automation of Word
necessary on the server-side.

http://msdn.microsoft.com/msdnmag/is...3/11/XMLFiles/

http://msdn.microsoft.com/library/en...HV01116151.asp

-Dino



"Gary@FAA" <GaryFAA (AT) discussions (DOT) microsoft.com> wrote

Quote:

"Thomas Scheidegger [MVP]" wrote:

Hi

ASP.NET


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





--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/




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.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.