I have a Range
object and I want to use it to extract information from the page where the Range
reside in. The information is in the headers and the footers inside a table, I want to read the text from the table.
I tried: word.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Shapes.Range(ref pageNumber).TextFrame.TextRange.Text;
Where word is a Range
and pageNumber
is the page number this range reside in.
The problem is I can't get the real page number! using word.get_information(WdInformation.wdActiveEndPageNumber)
returns incorrect page number!