Thread: [Solved] Go To Index Macro
View Single Post
 
Old 11-18-2014, 12:34 PM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Phil,

I had the Exit For in the wrong place. Sorry:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oFld As Word.Field
  For Each oFld In ActiveDocument.Range.Fields
    If oFld.Type = wdFieldIndex Then
      oFld.Select
      Exit For
    End If
    
  Next oFld
    
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote