Vahid Beyranvand
Vahid Beyranvand

Reputation: 67

Insert html tag into word document using Microsoft.Office.Interop.word in asp.net

How can I insert html tag into word document using Microsoft.Office.Interop.word in asp.net

my code is:

Microsoft.Office.Interop.Word.Paragraph oPara1;
oPara1 = oDoc.Content.Paragraphs.Add(ref oMissing);
oPara1.Range.Text = "<b>Heading 1</b>";
oPara1.Range.InsertParagraphAfter();

Upvotes: 1

Views: 1625

Answers (2)

Davis Jebaraj
Davis Jebaraj

Reputation: 403

Essential DocIO can be used to insert HTML into Doc: C# sample. The sample linked to here is ASP.NET based, but the library can be used from Windows Forms, WPF, ASP.NET Webforms, ASP.NET MVC and other platforms.

The whole suite of controls is available for free (commercial applications also) through the community license program if you qualify. The community license is the full product with no limitations or watermarks.

Note: I work for Syncfusion.

Upvotes: 0

Peter Smith
Peter Smith

Reputation: 5550

You should NOT run Office products on a server - see here. Look for another library that can be used such as Aspose.

Upvotes: 4

Related Questions