I'm writing a Macro for Word 2000 where I need to know what is the current page number I am on in the Word document, and if I am hitting the last page. I am using VBA.
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage ~inserts the current page
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages ~inserts the number of all pages
What I am having problems doing is grabbing these numbers and assigning them to a variable.
If you please know how, I will be saved a lot of headache..
Help!
Thanks
1Jelena
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage ~inserts the current page
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages ~inserts the number of all pages
What I am having problems doing is grabbing these numbers and assigning them to a variable.
If you please know how, I will be saved a lot of headache..
Help!
Thanks
1Jelena