![]() |
#2
|
|||
|
|||
![]()
Finding text with a range object doesn't select the text so your selection is where it is throughout the process:
Code:
Dim oRng As Range Sub getPosition() Debug.Print oRng.Information(wdVerticalPositionRelativeToPage) Debug.Print oRng.Information(wdHorizontalPositionRelativeToPage) End Sub Sub Test() Set oRng = ActiveDocument.Range With oRng.Find .Text = "Test Words" While .Execute getPosition oRng.Collapse wdCollapseEnd Wend End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Shelley Lou | Word VBA | 1 | 12-23-2021 06:24 AM |
![]() |
dogbural | Word VBA | 2 | 06-07-2020 04:12 PM |
Working with selection.tables | PRA007 | Word VBA | 3 | 02-25-2016 01:49 AM |
![]() |
PRA007 | Word VBA | 2 | 02-19-2016 12:52 AM |
![]() |
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |