Go to start of paragraph

J

Jules

Is there any code to go to the beginning of the current paragraph. I have
tried:

Selection.MoveUp Unit:=wdParagraph, Count:=1

This works, except if you are alreday at the beginning of the paragraph it
goes to the previous paragraph. Is there any code for this or would I have
to put some sort of if statement to determine whether the cursor was already
at the beginning of the paragraph?

thanks,
 
J

Jay Freedman

Try this instead:

Selection.Paragraphs(1).Range.Characters(1).Select
Selection.Collapse wdCollapseStart
 
J

Jules

Thanks Jay, works perfectly.

Jay Freedman said:
Try this instead:

Selection.Paragraphs(1).Range.Characters(1).Select
Selection.Collapse wdCollapseStart




--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
 
J

Jennifer Thomas

Thanks from me too, Jay -- you always come through for me with the VBA I can't find in Help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top