Using Visual Studio/C# 2008
I am generating a report with multiple pages, the first 3 pages need different footers. I have successfully created a footer on the title page, and the TOC (Table of Contents) or second page. However, when I try to add a different footer to the 3rd page it adds the same text and fields to the second page footer as well. Below is a snippet of my code thus far. I have commented out the last footer section since it doesn't work. The only difference between page2 footer and page3 footer is the format of the page number. Can anyone shed some light on this please? I have been banging my head against a wall for a few hours now and it is starting to hurt.
using
Microsoft.Office.Interop.Word.
varDoc.Activate();
//First Page Header
varDoc.ActiveWindow.ActivePane.View.SeekView =
varDoc.ActiveWindow.Selection.Borders[
varDoc.ActiveWindow.Selection.Paragraphs.Alignment =
varDoc.ActiveWindow.Selection.Font.Name =
varDoc.ActiveWindow.Selection.Font.Size = 16;
varDoc.ActiveWindow.Selection.Font.Bold = 1;
varDoc.ActiveWindow.Selection.TypeText(
varDoc.ActiveWindow.ActivePane.View.NextHeaderFooter();
varDoc.ActiveWindow.Selection.Font.Size = 11;
varDoc.ActiveWindow.Selection.TypeText(proj.projectAcronym +
varDoc.ActiveWindow.Selection.TypeParagraph();
varDoc.ActiveWindow.Selection.InsertDateTime(
varDoc.ActiveWindow.Selection.HeaderFooter.LinkToPrevious =
varDoc.ActiveWindow.Selection.Font.Bold = 0;
varDoc.ActiveWindow.Selection.Fields.Add(varDoc.ActiveWindow.Selection.Range,
varDoc.ActiveWindow.Selection.HeaderFooter.PageNumbers.NumberStyle =
varDoc.ActiveWindow.Selection.HeaderFooter.PageNumbers.RestartNumberingAtSection =