• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1400
  • Last Modified:

Word VBA - position in code

hello - I am using this to reference a page

Selection.GoTo wdGoToPage, wdGoToAbsolute, p3

However after i get the code to get to this page I would like to position the cursor (before it carrys on) three lines down from the top of the page - how can i do this.

Is this the best way in which to get a position on a page in the document ?

Many thanks,

GISVPN
0
gisvpn
Asked:
gisvpn
  • 3
  • 3
1 Solution
 
JonMnyCommented:


    Selection.MoveDown Unit:=wdLine, Count:=3

0
 
gisvpnAuthor Commented:
perfect thanks - is this the best way in which to reference something in a document ?
0
 
JonMnyCommented:
I usually use bookmarks in word docs when I need to select areas
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
gisvpnAuthor Commented:
Can a book mark marker a position as well as an area?
0
 
JonMnyCommented:
Yeah,

In word 2007 (Im sure its the same for other versions) you just highlight the area select insert bookmark

then this macro would select it

 Selection.GoTo What:=wdGoToBookmark, Name:="me"
    With ActiveDocument.Bookmarks
        .DefaultSorting = wdSortByName
        .ShowHidden = False
    End With
    ShowVisualBasicEditor = True
End Sub


ANother option I have used is section breaks for separating areas.
0
 
gisvpnAuthor Commented:
cool thanks :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now