O
Oz
Hi,
I've written a macro that will edit my bookmark addresses to a link in
the same document using a simple search then replace loop. The problem
is, the new addresses point to a place that doesn't exist - the place
in the file is right, but the file name itself isn't there. For
example, the link might turn out to be:
C:\Desktop\Bookmark_name
So the file isn't actually in there!
My code is:
For Each oBookmark In ActiveDocument.Bookmarks
oBookmarkName = oBookmark.Name
If InStr(1, oBookmarkName,HLinkName, vbTextCompare) = 1
Then
MsgBox oBookmarkName
ActiveDocument.Hyperlinks(i).Address =
oBookmarkName
End If
Next oBookmark
Thanks!
I've written a macro that will edit my bookmark addresses to a link in
the same document using a simple search then replace loop. The problem
is, the new addresses point to a place that doesn't exist - the place
in the file is right, but the file name itself isn't there. For
example, the link might turn out to be:
C:\Desktop\Bookmark_name
So the file isn't actually in there!
My code is:
For Each oBookmark In ActiveDocument.Bookmarks
oBookmarkName = oBookmark.Name
If InStr(1, oBookmarkName,HLinkName, vbTextCompare) = 1
Then
MsgBox oBookmarkName
ActiveDocument.Hyperlinks(i).Address =
oBookmarkName
End If
Next oBookmark
Thanks!