Forums

Overview » C# » C# Doc to HTML
Reply

C# Doc to HTML

Wallace Stephen
Member



Since: 23 Nov 2010
Posts: 63
Posted 09 Aug 2011 09:48:20

Design Website in Word Doc file is a great solution for beginners as it does not need write HTML code and is very fast to realize what you want. After design the website in Word Doc file, the next step may be converting the file from Doc to HTML.

Spire.Doc which is a professional .NET Word component can help us easily use C# convert files from Doc to HTML.

C# Doc to HTML via Spire.Doc:

private void button1_Click(object sender, EventArgs e)
{
//Create word document
Document document = new Document();
document.LoadFromFile(@"..\..\..\..\..\..\Data\FindAndReplace.doc";

//Save doc file.
document.SaveToFile("Sample.html", FileFormat.Html);

//Launching the MS Word file.
WordDocViewer("Sample.html";
}

private void WordDocViewer(string fileName)
{
try
{
System.Diagnostics.Process.Start(fileName);
}
catch { }
}

Design Website in Word Doc file is a great solution for beginners as it does not need write HTML code and is very fast to realize what you want. After design the website in Word Doc file, the next step may be converting the file from Doc to HTML.

Spire.Doc which is a professional .NET Word component can help us easily use C# convert files from Doc to HTML.

C# Doc to HTML via Spire.Doc:

private void button1_Click(object sender, EventArgs e)
{
//Create word document
Document document = new Document();
document.LoadFromFile(@"..\..\..\..\..\..\Data\FindAndReplace.doc";

//Save doc file.
document.SaveToFile("Sample.html", FileFormat.Html);

//Launching the MS Word file.
WordDocViewer("Sample.html";
}

private void WordDocViewer(string fileName)
{
try
{
System.Diagnostics.Process.Start(fileName);
}
catch { }
}

Reply to this topic

Message
Reply
Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency