Monday, March 26, 2012

Server Side Word Application

I'm trying to create a server side application (through a web front end)

that allows me to print specific documents from the server

im using:

Dim wordapp = New Word.Application

and have added the word reference (and installed word on the server)

the problem i have is that when i run the above code i get an:

Access is denied.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more information
about the error and where it originated in the code.

any help with this would be greatly appreciated as ive hit a brick wall with
things to try

thanks in advance

Mike FellowsIf you know the doc name and the location of the doc why open word, just
send the doc to the printer?
I'm doing the exact same thing but with PDF docs using BizTalk

"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> Description: An unhandled exception occurred during the execution
of
> the current web request. Please review the stack trace for more
information
> about the error and where it originated in the code.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
I cant do that as i need to edit some bookmarks within the word document
otherwise it would be great

Mike Fellows

"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:uQpDFXKSEHA.1216@.TK2MSFTNGP10.phx.gbl...
> If you know the doc name and the location of the doc why open word, just
> send the doc to the printer?
> I'm doing the exact same thing but with PDF docs using BizTalk
>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> wrote in message
> news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > Description: An unhandled exception occurred during the
execution
> of
> > the current web request. Please review the stack trace for more
> information
> > about the error and where it originated in the code.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
You can create ActiveX word object on client side and manipulate the bookmarks.
I just had the same with Excel.
I think that the solution is just to add a web.config file in the same
folder as your aspx with the code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<identity impersonate="true"/>
</system.web>
</configuration
"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> I'm trying to create a server side application (through a web front end)
> that allows me to print specific documents from the server
> im using:
> Dim wordapp = New Word.Application
> and have added the word reference (and installed word on the server)
> the problem i have is that when i run the above code i get an:
> Access is denied.
> Description: An unhandled exception occurred during the execution
of
> the current web request. Please review the stack trace for more
information
> about the error and where it originated in the code.
> any help with this would be greatly appreciated as ive hit a brick wall
with
> things to try
> thanks in advance
> Mike Fellows
Thanks
i will give that a goo

Mike Fellows

"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > Description: An unhandled exception occurred during the
execution
> of
> > the current web request. Please review the stack trace for more
> information
> > about the error and where it originated in the code.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
Bin,

could you point me to a document explaining how to do this client side?

Thanks

Mike

"Bin Song, MCP" <anonymous@.discussions.microsoft.com> wrote in message
news:00924C08-9A8B-4A6C-B5E9-A1F58677A23A@.microsoft.com...
> You can create ActiveX word object on client side and manipulate the
bookmarks.
Franky,

this then opens word on the server, but it seems impossible to manipulate
i cant even set the word object to visible

Thanks

Mike

"Franky" <fnappey@.lcf-com.removethis.com> wrote in message
news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> I just had the same with Excel.
> I think that the solution is just to add a web.config file in the same
> folder as your aspx with the code:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.web>
> <identity impersonate="true"/>
> </system.web>
> </configuration>
> "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
message
> de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > I'm trying to create a server side application (through a web front end)
> > that allows me to print specific documents from the server
> > im using:
> > Dim wordapp = New Word.Application
> > and have added the word reference (and installed word on the server)
> > the problem i have is that when i run the above code i get an:
> > Access is denied.
> > Description: An unhandled exception occurred during the
execution
> of
> > the current web request. Please review the stack trace for more
> information
> > about the error and where it originated in the code.
> > any help with this would be greatly appreciated as ive hit a brick wall
> with
> > things to try
> > thanks in advance
> > Mike Fellows
Please see:
HOWTO: Automate Excel from an HTML Web Page Using JScript
http://support.microsoft.com/defaul...kb;en-us;234774
Yes, I got the same problem with Excel.
The only solution I find (for Excel) is to install Excel 2003 instead of
Excel XP. And I posted a news concerning Excel XP...

"Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le message
de news:xEmvc.37$An.15@.newsfe6-win...
> Franky,
> this then opens word on the server, but it seems impossible to manipulate
> i cant even set the word object to visible
> Thanks
> Mike
>
> "Franky" <fnappey@.lcf-com.removethis.com> wrote in message
> news:uH7TLyKSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> > I just had the same with Excel.
> > I think that the solution is just to add a web.config file in the same
> > folder as your aspx with the code:
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> > <system.web>
> > <identity impersonate="true"/>
> > </system.web>
> > </configuration>
> > "Mike Fellows" <mike.fellows.SPAM@.equityhouse.co.uk> a crit dans le
> message
> > de news:nplvc.52$1d7.29@.newsfe3-win.server.ntli.net...
> > > I'm trying to create a server side application (through a web front
end)
> > > > that allows me to print specific documents from the server
> > > > im using:
> > > > Dim wordapp = New Word.Application
> > > > and have added the word reference (and installed word on the server)
> > > > the problem i have is that when i run the above code i get an:
> > > > Access is denied.
> > > Description: An unhandled exception occurred during the
> execution
> > of
> > > the current web request. Please review the stack trace for more
> > information
> > > about the error and where it originated in the code.
> > > > any help with this would be greatly appreciated as ive hit a brick
wall
> > with
> > > things to try
> > > > thanks in advance
> > > > Mike Fellows
> >

0 comments:

Post a Comment