Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move the selection (insert point) to a specific range

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
How can I move my insert point to a known range (end or start)? Thanks
 
Hi,

What application?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
If Word, I'd look at the Collapse method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OR if you just want to go to the Start (and Collapsed):
Code:
Selection.Start = _
      [i]range[/i].Start

as in:

Code:
Selection.Start = _
      ActiveDocument.Bookmarks("yadda").Range.Start
Works exactly the same for End.

If you are using Section.Range it is a little trickier.

Code:
Selection.Start = _
      ActiveDocument.Sections(1).Range.End
moves the Selection to the start of Section 2.
Code:
Selection.Start = _
      ActiveDocument.Sections(1).Range.End [COLOR=red][b]- 1[/b][/color red]
moves the Selection the actual End of Section 1 - just before the section break...if there is one. If there is only Section 1, then the Selection is moved to just before the final paragraph mark.

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top