Subject: Word and Asp
Posted By: mcloide Post Date: 1/5/2006 10:28:05 AM
Hi

I'm using this code to open a Word document and read it.

<%
docpath = "C:\doc1.doc"
set word = createobject("Word.Application")
text = word.documents.open(docpath).Content.Text
word.quit
response.write(text)
%>

The problem is that it looses all tables and images.
Does anybody know some way to read a word document widhout loosing the format?

Cristiano D. Silva
Reply By: ChrisScott Reply Date: 1/5/2006 10:47:41 AM
Hi Cristiano,

Are you trying to write a word document to the browser?

Cheers,

Chris

Reply By: mcloide Reply Date: 1/5/2006 11:11:17 AM
I'm trying to view the document.

Cristiano D. Silva
Reply By: mat41 Reply Date: 1/5/2006 5:55:03 PM
This seems to simple to be your solution. Anyhow, you dont need to create any kind of object for this, use a regular anchor tag:

<a href="http://domainName.suffix/dirName/docName.doc" title="Open word doc in new window" target="_blank">Open Doc</a>

The:
target="_blank">
will open the doc in a new window.  Remove this if you want to open it in the same window.

Wind is your friend
Matt

Go to topic 38302

Return to index page 402
Return to index page 401
Return to index page 400
Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393