Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > exporting word file content to aspx web page

Reply
Thread Tools

exporting word file content to aspx web page

 
 
Franck
Guest
Posts: n/a
 
      10-14-2005
Hello,
I'm trying to diplay the content of a word file on a aspx page
only the content if possible... not the file

I tried the folowing but it doesn't work...
Response.ContentType = "application/ms-word";
string file ="Annexes.doc";
Response.WriteFile(file);
the only documentation I can find is for doing the reverse?
Are there any tools for doing so?
thanks for your help.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?=
Guest
Posts: n/a
 
      10-14-2005
You have two options I can think of right now.

1. Use the Word COM objects to pull the content out.
2. If Word 2000 or greater and saved in non-backward compatible format, pull
the XML and remove the tags via XSLT. Display the information that is left.

Number 1 may be easier to get going with, but requires putting Office DLLs
on your server. It is also slower. It is the only option I know with Word
Native format.

Number 2 will take a bit more work, but you might find someone who has an
XSLT created for this type of work.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"Franck" wrote:

> Hello,
> I'm trying to diplay the content of a word file on a aspx page
> only the content if possible... not the file
>
> I tried the folowing but it doesn't work...
> Response.ContentType = "application/ms-word";
> string file ="Annexes.doc";
> Response.WriteFile(file);
> the only documentation I can find is for doing the reverse?
> Are there any tools for doing so?
> thanks for your help.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Exporting Web page to word in Asp.net(c#) amey.rane86 Software 0 10-06-2009 01:49 PM
export aspx page to word format or pdf format as it is display in aspx page getmeaditi Software 0 03-10-2009 07:15 AM
How to fire off a completely seperate .aspx page from within an .aspx web page. S_K ASP .Net 1 10-02-2007 12:05 AM
exporting word file content to aspx web page Franck ASP .Net 0 10-13-2005 01:58 PM



Advertisments