![]() Whenever the document closes, it places a bookmark, named "StoppedHere", at the last location of the cursor. Here is another example, I always have the following code in my documents. Selection.GoTo What:=wdGoToBookmark, Name:="Text35Orig" Although the code is not the way I would do it. Yachtie's suggestion of using a bookmark is one of the best ways. If the selection is BEFORE the start of paragraph 3, then the Selection (cursor) will simply move to the start of paragraph 3.ĭo you want to select anything between where you are, and the "specific location"? This is different from just going to that location. If the Selection (cursor) is AFTER the start of paragraph 3, everything from the Selection point to the start of paragraph 3 will be selected (highlighted). Selection.Start = ActiveDocument.Paragraphs(3).Start Selection.Collapse Direction:=wdCollapseStart ' just in case the selection is larger than one character The issue is - do you know the specific location as a place? And do you just want to go there? Or do you want to select anything on the way. Most people do not know the specific location as an integer. So if you know the specific location (say 14672) then to make the cursor go there: The cursor in Word is called the Selection, and it has a range start (and end). Everything in Word starts counting from the beginning of the document (0), in character spaces. If you know the specific location, then simply make the cursor start there.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |