Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Go to start of paragraph

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jules - 07 Dec 2007 03:16 GMT
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,
Jay Freedman - 07 Dec 2007 03:46 GMT
Try this instead:

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

>Is there any code to go to the beginning of the current paragraph.  I have
>tried:
[quoted text clipped - 7 lines]
>
>thanks,

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Jules - 07 Dec 2007 04:34 GMT
Thanks Jay, works perfectly.

> Try this instead:
>
[quoted text clipped - 18 lines]
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.