Last post Apr 06, 2007 12:35 PM by QasimRaza
Apr 06, 2007 12:35 PM|QasimRaza|LINK
I have a document with total 4 pages and with a table in the header section. Header Table has 2 rows and 4 cells. I need to add a Page number field in the cell(2,2) . Formate of this field should be Page 1 of 4.
Problem there is that when ever i try to place this Field in the desired cell. Application doesn't update it and throws a interop Exception. I have got the following code from MSDN but the problem with this is that it replaces table
in the header section with Page 1 of 4 (where 1 is the current page and 4 is the total number of pages in document)
Dim section As Microsoft.Office.Interop.Word.Section
For Each section
Word.WdFieldType.wdFieldEmpty, "AUTOTEXT ""Page X of Y"" ",
Can any body tell me how to place Field in a particular cell of a header table?