I made a Macro to add new customers to a table and keep track of there data in a seperate file. All the files are kept on a server and need to be able to be avalible to everyone on the Local network.
The command I used to make the link is -
vFileLocation = ActiveDocument.FullName
'Close and Return to table
Selection.GoTo What:=wdGoToBookmark, Name:="Click"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = True
End With
Selection.Delete
Selection.Document.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"MACROBUTTON Temp3 Press When Done", PreserveFormatting:=False
ActiveDocument.Close
Documents("Customer Database.doc").Activate
Selection.MoveRight 1
Set aHLink = ActiveDocument.Hyperlinks.Add( _
Anchor:=Selection.Range, _
Address:=vFileLocation, TextToDisplay:="-Notes-")
It seems to make a good link until I save the table. After that all the links are messed up.
Any ideas on hoew to fix the problem?
The command I used to make the link is -
vFileLocation = ActiveDocument.FullName
'Close and Return to table
Selection.GoTo What:=wdGoToBookmark, Name:="Click"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = True
End With
Selection.Delete
Selection.Document.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"MACROBUTTON Temp3 Press When Done", PreserveFormatting:=False
ActiveDocument.Close
Documents("Customer Database.doc").Activate
Selection.MoveRight 1
Set aHLink = ActiveDocument.Hyperlinks.Add( _
Anchor:=Selection.Range, _
Address:=vFileLocation, TextToDisplay:="-Notes-")
It seems to make a good link until I save the table. After that all the links are messed up.
Any ideas on hoew to fix the problem?