473,327 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

exporting word file content to aspx web page

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.
Nov 19 '05 #1
1 1850
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.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: enak | last post by:
I have found some code that shows how to convert an html form to Word. The message said to simply put the following in the Page_load: Response.ContentType = "application/ms-word"...
3
by: sonic | last post by:
Hi, displaying information on a page as MS Word document seems to be as simple as: //OnLoad Response.ContentType = "application/msword"; Response.Write ( MyContentString ); (this assuming...
3
by: gowens | last post by:
I have an ASP.Net multi-part tabbed page. One of the tab pages contains several controls (including a DataList). The DataList contains, virtually-rendered, Database images and some text fields....
10
by: Åženol Akbulak | last post by:
Hi, I have a form page to print on my web application(asp.net). I want to show the page in WORD. I use that code in asp.net Page_Load event: Response.Clear(); Response.ContentType =...
1
by: Mustufa Baig | last post by:
I have an ASP.NET website where I am showing off crystal reports to users by exporting them to pdf format. Following is the code: ---------------- 1 Private Sub ExportReport() 2 Dim oStream...
0
by: Franck | last post by:
Hello, I'm trying to diplay the content of a word file on a aspx page only the content if possible... not the file the only documentation I can find is for doing the reverse? Is there any tools...
2
by: Yaseen D M | last post by:
I have aspx page which contains some gif, jpg and png images. PNG image is generated dynamically. This file is basically a graph image. The problem i am facing in exporting these images to word,...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
2
by: allan.s.palmer | last post by:
Hello, I have an asp.net pop up that is generating a Word document real time and sending it to the user by sending the appropriate response headers. When it is run on our development environment...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.