Hi
I have recorded the following macro
Sub aboutVLANS()
'
' aboutVLANS Macro
'
'
Selection.Range.Hyperlinks(1).Range.Fields(1).Result.Select
Selection.Range.Hyperlinks(1).Delete
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, address:="", _
SubAddress:="_About_VLANs"
Selection.Collapse Direction:=wdCollapseEnd
End Sub
which changes the current link from pointing to an external document to a heading in the current doc.
I have then changed the subaddress to
SubAddress:="_Displaying_VLANs"
in the hope that this would change any link this macro is run on to point to the Dislaying VLANs heading but it does not work.
Does anyone know how to change the above code to work with different headings within a Word 2000 document?
If I were to record myself manually changing the link to point to Displaying VLANs the macro would produce the same as I have above and work. Why when I edit the macro code does it not?
I have recorded the following macro
Sub aboutVLANS()
'
' aboutVLANS Macro
'
'
Selection.Range.Hyperlinks(1).Range.Fields(1).Result.Select
Selection.Range.Hyperlinks(1).Delete
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, address:="", _
SubAddress:="_About_VLANs"
Selection.Collapse Direction:=wdCollapseEnd
End Sub
which changes the current link from pointing to an external document to a heading in the current doc.
I have then changed the subaddress to
SubAddress:="_Displaying_VLANs"
in the hope that this would change any link this macro is run on to point to the Dislaying VLANs heading but it does not work.
Does anyone know how to change the above code to work with different headings within a Word 2000 document?
If I were to record myself manually changing the link to point to Displaying VLANs the macro would produce the same as I have above and work. Why when I edit the macro code does it not?