About Word automation on the server

G

Guest

Hi everybody:
I've developed a web application running on a 2003 server not on the web but
on extranet environment of a small Firm (less than 10 users). I've taken
benefit of Office Primary Interop Assemblies (PIAs) for automating Word on
the server and everything runs smoothly on the server console. The word
documents are generated perfectly from all clients and stored on the server
with some data comes from a SQL server and/or stores there interactively. The
only problem is that when I'm calling :
worddoc = wordapp.Documents.Open(Server.MapPath("\templateP.dot"), , False,
, , , , , , Word.WdOpenFormat.wdOpenFormatTemplate, , ................
it opens on the server's console and not on the clients' machine.
can anybody helps to get rid of this issue? thanks in advance

Kash
 
P

Patrice

As the code runs on the server this is expected. You could save the doc on
the server and then open the document from client side (for example using
Response.redirect to the created Word file or a streaming page).

Geenrally it is recommended to avoid Office automation server side.
Alternate options are to create those documents client side (when in an
intranet environment as it has some security issues) or to create the
document using XML (doesn't require Word server side).
 
G

Guest

Patrice:
thanks for response. Are you saying that there is no way to open a Word
document (which is stored somewhere on the server) on the client's machine,
make changes to it and then save it back again on the server?

thanks again
Kash
 
P

Patrice

I meant that for now it looks like to me you are running server side code
i.e. Word opens server side.

AFAIK Word is able to open/save files directly from internet folders :
http://www.microsoft.com/windows200...windows2000/en/server/iis/htm/core/wcwdcp.htm

You could also run a macro that does this job on the client machine (you'll
have to adjust security).

If all is ok except the final opening you could just save the file and then
redirect the browser (response.redirect) to the word document.
 
G

Guest

Patrice
thanks again for your help. I'm already studying WebDav thing as you hinted
in. Regarding the another part of your comments, yes all is ok with my
developed application and I can redirect the user to the document on the
server easily but the problem is that the user is not able to edit the
document. It opens inside the web browser with 'reveiwing' tool bar at the
top. Even if I attend the standard toolbar by right clicking on the tool bar
and choosing 'standard', although the save button appears but it doesn't
work. there is no way to save the document on the server except closing the
window which is not an option obviously.

Kash
 

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