Harsha
Harsha

Reputation:

Download the html text collected in a string builder to word document in VB.NET Console Application

I have a requirement to move the html text available in a string builder to a word document and open the word document after the data is appended in a VB.NET console application. I am new to console applications and am not sure how this could be done, but I am aware that if I am using a Web Application then I can use the following code:

Response.AppendHeader("Content-Type", "application/msword")

Response.AppendHeader("Content-disposition", "attachment; filename=myword.doc")

Response.Write(String Builder Variable)

Can some help me with the code please....???

Upvotes: 0

Views: 940

Answers (1)

Noon Silk
Noon Silk

Reputation: 55072

Write it to a '.doc' file and use ShellExecute to call 'open' on it.

Upvotes: 1

Related Questions