473,396 Members | 1,990 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,396 software developers and data experts.

export to msword - html

hi guys I'm trying to export an aspx page to msword.

#############

I know you can do

Response.Clear();

Response.ContentType="application/msword";

Response.AddHeader("Content-disposition",

"attachment; filename=myword.doc");

Response.Charset = "";

StringWriter sw = new StringWriter();

HtmlTextWriter htw = new HtmlTextWriter(sw);

this.Label1.RenderControl(htw);

Response.Write(sw.ToString());

Response.End();

#################

and render a control to msword. the problem is when I do this to render the
label the HTML is not converted to word xml when the ms word opens.

I assumed that it would be based on the same principle as opening a html
file in msword where word automatically converts the html file to word
format.

is it possible to do this ? atm the html is rendered as text too so I get a

<span id="Label1">test</span>

instead of just "test"

Thanks

Tom
Jul 21 '05 #1
0 1620

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

Similar topics

2
by: Guillaume Durand | last post by:
Hi, I transform XML data in an OutputStream which is open as a word document. All works fine excepted the images defined in the xsl file which are html links (src="images/image1.jpg"). So, when...
4
by: Robert | last post by:
Hello, I would like to take the data from a query and export it to an MSWord doc or dot that can display the fields. (Auto fill) I have been trying to figure out how to do this, but have not...
0
by: Tom Gao | last post by:
hi guys I'm trying to export an aspx page to msword. ############# I know you can do Response.Clear(); Response.ContentType="application/msword";
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
0
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
1
by: manmit.walia | last post by:
Hello All, I am stuck on a task that I need to complete. What I have is a SQL 2005 DB running with a Table called Docs. The table structure consists of the following: Table Structure for Docs...
2
by: manmit.walia | last post by:
Hello All, I am stuck on a task that I need to complete. What I have is a SQL 2005 DB running with a Table called Docs. The table structure consists of the following: Table Structure for Docs...
1
by: Cloud | last post by:
Hi all, I have a parent page(parent.aspx) which will open different new windows depending on the user input. for example, the new windows are opened using the following code :...
0
by: nightscorpion | last post by:
Hello Everyone , im supposed to create a Customer with labels (name,add,Telnr...)and textboxes(thomas ,karsplatz,23423423423) in a windows form. i store all these data in a class...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.