We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can convert Footer part from WordML to Html

Hi guys,

I have question : How can convert a part of WordML to Html ?.
Please help me see example in attachment file . This is footer of Word.

Quan Truong

Hi Quan,

Thanks for your inquiry. Node.ToString method (SaveFormat) exports the content of the node into a string in the specified format. Following code example shows how to export the content of a node to string in HTML format using default options.

Document doc = new Document(MyDir + “Document.doc”);

// Extract the last paragraph in the document to convert to HTML.

Node node = doc.LastSection.Body.LastParagraph;

// When ToString is called using the SaveFormat overload then conversion is executed using default save options.

// When saving to HTML using default options the following settings are set:

// ExportImagesAsBase64 = true

// CssStyleSheetType = CssStyleSheetType.Inline

// ExportFontResources = false

string nodeAsHtml = node.ToString(SaveFormat.Html);

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}


Thanks for your response. Currently, My application using Aspose Word version 10.0.0. So, It doesn’t support function node.ToString(SaveFormat.Html). How to implement it in this version?
Quan Truong

Hi Quan,

Thanks for your inquiry. This feature is not available in older version of Aspose.Words. Please use Aspose.Words for .NET 14.11.0 and let us know if you have any more queries.