Hello. There is one document with many pages. The insert point is on one (on any) page. I need to move to last line (in start this line) on this page. How can I do it? Thank you.
Something like the following should work: 'Go to end of current page ActiveDocument.Bookmarks("\Page").Range.Characters.Last.Select 'Move to start of the line Selection.HomeKey wdLine Note, however, that in case of the last page in a document, the â\Pageâ bookmark does not include the last paragraph mark on the page. Therefore, if the last paragraph in the document is an empty paragraph and if the last page contains more than that paragraph, the code above will position the insertion marker in the start of the second last line. -- Regards Lene Fredborg - Microsoft MVP (Word) DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "avkokin" wrote: > Hello. > There is one document with many pages. The insert point is on one (on > any) page. I need to move to last line (in start this line) on this > page. How can I do it? > Thank you. >
How about Dim oPage As Range Set oPage = ActiveDocument.Bookmarks("\page").Range oPage.Select With Selection .EndKey .HomeKey End With -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> avkokin wrote: > Hello. > There is one document with many pages. The insert point is on one (on > any) page. I need to move to last line (in start this line) on this > page. How can I do it? > Thank you.
Thank you very much!