![]() |
#1
|
||||
|
||||
![]()
I have Googled and found nothing. ChatGPT offered me this:
Sub JumpToNextCrossReference() Dim rng As Range Dim fld As Field ' Define the range to search for cross-references Set rng = Selection.Range ' Loop through each field in the document For Each fld In ActiveDocument.Fields If fld.Type = wdFieldRef Then ' Check if the field is within the defined range If fld.Result.InRange(rng) Then ' Select the field and exit the loop fld.Select Exit For End If End If Next fld End Sub But it is not working and I cannot understand why. SF |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Command Buttons to Navigate thru Word | SnakeDoctor | Word VBA | 2 | 07-06-2023 07:47 AM |
Macro to navigate to specific point in line (Word 97) | Genericname1111 | Word | 13 | 10-06-2019 08:54 PM |
Can't navigate to entries in table of contents | treez | Word | 4 | 12-25-2018 08:37 AM |
![]() |
LOUF | Word VBA | 1 | 12-07-2015 06:47 PM |
Macro Location | eliz.bell | Word | 0 | 10-05-2009 07:44 PM |