choppysuey
Technical User
Hi all, could someone please tell me how to get the current page number that the cursor is on in a word document. Which collection of objects is this information found in??
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
oWord = createobject('word.application')
odocument=oWord.Documents.Open('c:\all products') && Multiple page document.
oDocument.Repaginate && Tout make sure the pagecount is right
DO WHILE oWord.selection.Information(3)<> oWord.Selection.Information(4)
MESSAGEBOX( "The cursor is on page" +TRANSFORM(oWord.selection.Information(3)) + " of a total of "+;
TRANSFORM(oWord.Selection.Information(4)))
oWord.Browser.Next && Skip a Page
ENDDO