Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display html content on word doc help please

Status
Not open for further replies.

iis6newbie

Technical User
Nov 22, 2003
54
US
Hello all,
can someone help me how to display html content on word document using VBscript?


<html>
<body>
testing string
</body>
</html>


I just want to see "testing string" in the word document. don't want to see any extra html tag in the word document.

Thanks for any help


Here is my C# code:

string strjscript = "<SCRIPT LANGUAGE=vbscript>\n";
strjscript += "Dim objWordobject\n";
strjscript += "Dim objDocobject\n";
strjscript += "Dim strReturnValue\n";
strjscript += "Set objWordobject = CreateObject(\"word.Application\")\n";
strjscript += "objWordobject.Visible = True\n";
strjscript += "Set objDocobject = objWordobject.Documents.Add( , , 1, True)\n";
string report = completeReport.ToString().Replace("\"", "&qt;");
strjscript += "objDocobject.Content="+"\"" + report+"\""+"\n";
strjscript += "</SCRIPT>";
ltr1.Text = strjscript;


///report is string that contained html code

 
Here is my C# code
You may get more accurate replies in a more adequate forum.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Specifically:
forum732

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top