|
 |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

January 5th, 2006, 11:28 AM
|
Registered User
|
|
Join Date: Jan 2006
Location: BH, Minas Gerais, Brazil.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Word and Asp
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
|

January 5th, 2006, 11:47 AM
|
Friend of Wrox
|
|
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Cristiano,
Are you trying to write a word document to the browser?
Cheers,
Chris
|

January 5th, 2006, 12:11 PM
|
Registered User
|
|
Join Date: Jan 2006
Location: BH, Minas Gerais, Brazil.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm trying to view the document.
Cristiano D. Silva
|

January 5th, 2006, 06:55 PM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
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
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |