473,548 Members | 2,622 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export to msword - html

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

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

I know you can do

Response.Clear( );

Response.Conten tType="applicat ion/msword";

Response.AddHea der("Content-disposition",

"attachment ; filename=myword .doc");

Response.Charse t = "";

StringWriter sw = new StringWriter();

HtmlTextWriter htw = new HtmlTextWriter( sw);

this.Label1.Ren derControl(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">tes t</span>

instead of just "test"

Thanks

Tom
Jul 21 '05 #1
0 1638

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

Similar topics

2
3953
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 I save the word document in a particular place, the image can't be displayed cause the path is no good anymore. I would like to merge the images in...
4
1873
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 found the appropriate documentation as to how to set this up. Can someone help me out here.
0
924
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
3250
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True Response.ContentType ="application/vnd.ms-excel" 'application/msword
0
2690
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 to export reports that have linked subreports. I receive (a "Missing parameter field current value") on the following statement: ...
1
3481
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 ------------------------------------ DocID int - Primary Key ClientID int - CustomerID CreatedByUser nvarchar - UserName
2
1627
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 ------------------------------------ DocID int - Primary Key ClientID int - CustomerID
1
1609
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 : window.open('child.aspx', document.userinput.value) In the child.aspx, the result is rendered as Excel, Word, PDF, etc...
0
1558
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 (get/set methods) However the problem arises when i got to export this data into a docx format(i.e when i click on the button "import" the...
0
7438
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.