• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1398
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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