Link to home
Start Free TrialLog in
Avatar of jouwstrm
jouwstrmFlag for United States of America

asked on

C# Word Header / Footer, using a table

I'm creating a dynamic word document, in which I am adding headers & footers. I have ran into an issue where I need to add page numbers on the left of my footer, and a disclaimer on the right of my footer. I figured the best way to do this would be to add a table to my footer, and separate the text with cells. Though I can't get it to work.

The code I added to the Code section is what I have tried so far.
Though after adding text to oTableFooter, its just being added to the body, not the footer.

All help is greatly appreciated.
Thanks!
Mike
Microsoft.Office.Interop.Word.Range wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
oDoc.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
Microsoft.Office.Interop.Word.Table oTableFooter = oDoc.ActiveWindow.Selection.Tables.Add(wrdRng, 1, 2, ref oMissing, ref oMissing);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jouwstrm
jouwstrm
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial