Editing a table inside the header

Hi,

We are using Aspose Words to convert a HTML file to DOCX, but with troubles to edit our header in the process.

I need to add a page count inside the header/footer because the when it gets converted to document, get more pages than in html.
The issue is: My header/footer are tables, and we don’t get to manage tables inside the document builder to add a PAGE field. Or at least we don’t know how.

The page number can be in any cell from this table, sometimes in row1 cell 2, row3 cell 3, and so on. I need to find which cell I need to change and apply the PAGE field.

@ipm.aspose IS there a placeholder or something that can be used as a placeholder for PAGE field in the table? If possible, could you please attach your input, output and expected output documents here for our reference? We will check the documents and provide you more information.

@ipm.aspose You can place the following HTML inside editor_variavel_paginacao DIV:

<span style="-aw-field-start:true"></span><span style="-aw-field-code:' PAGE '"></span><span style="-aw-field-separator:true"></span><span>1</span><span style="-aw-field-end:true"></span>

This HTML is interpreted as PAGE field by Aspose.Words.

1 Like

Perfect! It worked.
Just another question, where can I find others of these properties to put in html? I struggled a lot until find the header one also.

@ipm.aspose You can create what is required in MS Word document. Then convert it to HTML using Aspose.Words and check how it is exported to HTML.

1 Like

Nice, thank you!

1 Like