Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2004, 08:31 AM
Registered User
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to open word document using ASP and read

Hi

How to open the word document using ASP application and read the content. Plz help me.

 
Old March 29th, 2004, 09:22 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

Is there any specific reason you need to use word? You could try use something like this:
<%
docpath = "C:\doc1.doc"
set word = createobject("Word.Application")
text = word.documents.open(docpath).Content.Text
word.quit
response.write(text)
%>

However, see Microsoft Knowledge Base Article - 224338.
 
Old April 27th, 2004, 03:26 PM
Registered User
 
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try the following asp page:

<% @LANGUAGE=VBScript %>
<%
Response.ContentType = "application/msword"
Response.Expires = 0
%>

Hello! This message is displayed using MS Word and can be change and stored as usual.

Please write your name and save your new word document.
 
Old April 28th, 2004, 04:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

check out http://www.greggriffiths.org/webdev/both/excel/ which covers approaches to doing this with XL, the same concepts will apply to Word.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Automation- open word document ayazhoda Access VBA 2 November 4th, 2008 12:01 PM
Opening word document read only in VB StevenVints VB How-To 1 May 3rd, 2006 09:52 AM
insert word document to DB an read webphp PHP How-To 1 August 10th, 2005 02:34 PM
Cannot open Word Document At Client Side leo_ling Classic ASP Basics 6 July 1st, 2004 12:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.