Reputation: 99
I'm using Aspose.words in .net API and getting in an issue to add a separate table in word footer using this tool. Can anyone expedite me to do this?
Upvotes: 1
Views: 294
Reputation: 194
You can Insert a Table in Word footer with three cells using below piece of code:
var doc = new Document();
var builder = new DocumentBuilder(doc)
{
PageSetup =
{
Orientation = Orientation.Portrait,
PaperSize = PaperSize.Letter
},
};
builder.MoveToHeaderFooter(Word.HeaderFooterType.FooterPrimary);
builder.StartTable();
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 1");
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 2");
builder.InsertCell();
builder.CurrentParagraph.ParagraphFormat.Alignment = Word.ParagraphAlignment.Center;
builder.Write("Cell 3");
builder.EndTable();
builder.MoveToDocumentEnd();
Upvotes: 1