Hello Team ,
I need to show following text below in footer of my word document
AT&T Proprietary: The information contained herein is for use by authorized
persons only and is not for general distribution.
I coded like below but it did not help me , Please suggest in code to get how desired result.
-----Code----
pageSetup.DifferentFirstPageHeaderFooter = true;
// --- Create header for the first page. ---
pageSetup.HeaderDistance = 20;
builder.MoveToHeaderFooter(HeaderFooterType.HeaderFirst);
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
// Set font properties for Header/Footer text.
Aspose.Words.Style style_footer = doc.Styles.Add(StyleType.Paragraph, "MyStyle1");
style_footer.Font.Size = 7.5;
style_footer.Font.Name = "Calibri";
Aspose.Words.Style style_bold_footer = doc.Styles.Add(StyleType.Paragraph, "MyStyleBold1");
style_bold_footer.Font.Size = 7.5;
style_bold_footer.Font.Bold = true;
style_bold_footer.Font.Name = "Calibri";
builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
pageSetup.FooterDistance = 10;
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.InsertImage(bluehr, RelativeHorizontalPosition.Page, 0, RelativeVerticalPosition.Page, 0, 550, 1, WrapType.Inline);
Aspose.Words.Tables.Table table_footer = builder.StartTable();
builder.CellFormat.ClearFormatting();
// Set first cell to 20% of the page width.
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.ParagraphFormat.Style = style_footer;
builder.Writeln("");
builder.Writeln(deaddt);
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.CellFormat.ClearFormatting();
// Set the second cell to 60% of the page width.
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(65);
ParagraphFormat paragraphFormat = builder.ParagraphFormat;
paragraphFormat.Alignment = ParagraphAlignment.Center;
FieldIf fieldIf = (FieldIf)builder.InsertField(FieldType.FieldIf, false);
builder.MoveTo(fieldIf.Separator);
builder.InsertField(FieldType.FieldPage, true);
builder.Write(" > 3 \"Page ");
builder.MoveTo(fieldIf.Separator);
FieldFormula ff = (FieldFormula)builder.InsertField(FieldType.FieldFormula, false);
builder.MoveTo(ff.Separator);
builder.InsertField(FieldType.FieldPage, true);
builder.Write(" - 3 ");
builder.MoveToField(ff, true);
builder.Write("\"");
doc.UpdateFields();
builder.MoveToField(fieldIf, true);
builder.Writeln("");
builder.ParagraphFormat.Style = style_bold_footer;
builder.Write("ATT Proprietary:");
builder.ParagraphFormat.Style = style_footer;
builder.Write("The information contained herein is for use by authorized");
builder.Writeln(" persons only and is not for general distribution.");
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.CellFormat.ClearFormatting();
Thanks
Abhishek