Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamically generating content from a server-side .doc file

0 views
Skip to first unread message

David P. Donahue

unread,
Dec 30, 2002, 6:10:04 PM12/30/02
to
How would I go about using my ASP .NET page to, on page_load, grab a Word
document that's sitting on the server and output it to the client as HTML?
Also, if the word document has an outline in it, will that outline be
translated into drill-down links in the resulting HTML?


David P. Donahue
david....@firstsolution.com


Steve C. Orr, MCSD

unread,
Dec 30, 2002, 7:10:53 PM12/30/02
to
I'd think your best bet is to use COM Interop to communicate with Word.
Have it open the doc and save it as an HTML file.
Then output the HTML file to the response.output.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


"David P. Donahue" <david....@firstsolution.com> wrote in message
news:uzNMQiFsCHA.1776@TK2MSFTNGP10...

Andy Cheung

unread,
Dec 30, 2002, 9:22:56 PM12/30/02
to
Hi,

Beware of heavy loading exerting on the server when kick
the Word application on the server on every request of the
aspx page. If your situation allows, I'd suggest
converting all the documents to HTML first and store them
in another directory (or making a library of them if there
is a large number of documents). In any case, you'd need
the Primary Interop Assemblies.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnoxpta/html/odc_oxppias.asp

and you can do the conversion like this:

ActiveDocument.SaveAs FileName:="test.htm", _
FileFormat:=wdFormatHTML

Hope that helps ~
Andy Cheung
Please Visit My WebCam!!
http://www.hmcheung.com

>.
>

David P. Donahue

unread,
Dec 31, 2002, 10:24:51 AM12/31/02
to
Ok, I added a reference in my project to "Microsoft Word 10.0 Object
Library." Now how do I use it? I tried putting in some of the code on that
URL, but Visual Studio didn't recognize it. Same with the code you pasted
below (which is in a syntax I haven't seen in VB .NET and, thus, may not
fully understand).


David P. Donahue
david....@firstsolution.com


"Andy Cheung" <andyhm...@hotmail.com> wrote in message
news:0a2901c2b073$878cbb70$8df82ecf@TK2MSFTNGXA02...

David P. Donahue

unread,
Dec 31, 2002, 10:27:11 AM12/31/02
to
Yes, thank you for the terminology. But can you tell me "how" this is done?


David P. Donahue
david....@firstsolution.com

"Steve C. Orr, MCSD" <st...@orr.net> wrote in message
news:uJUPOEGsCHA.1644@TK2MSFTNGP09...

Steve C. Orr, MCSD

unread,
Dec 31, 2002, 3:26:12 PM12/31/02
to

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
 
 
"David P. Donahue" <david....@firstsolution.com> wrote in message news:##OHQEOsCHA.1132@TK2MSFTNGP12...
0 new messages