rob0923
08-11-2009, 12:10 PM
Hi,
I am pushing information from excel to word bookmarks, but I was wondering if there was a way to delete any bookmarks that are unused?
'Place into bookmark if Excel name match Word bookmark
If objDoc.Bookmarks.Exists(ExlNm.Name) Then
objDoc.Bookmarks(ExlNm.Name).Range.Text = ExlNm.Value
End If
Next ExlNm
After this statement is it possible to remove any unused word bookmarks
If not objDoc.Bookmarks.Exists(ExlNm.Name) Then
del / remove objDoc.Bookmarks
End If
Next ExlNm
Thanks in advance!
I am pushing information from excel to word bookmarks, but I was wondering if there was a way to delete any bookmarks that are unused?
'Place into bookmark if Excel name match Word bookmark
If objDoc.Bookmarks.Exists(ExlNm.Name) Then
objDoc.Bookmarks(ExlNm.Name).Range.Text = ExlNm.Value
End If
Next ExlNm
After this statement is it possible to remove any unused word bookmarks
If not objDoc.Bookmarks.Exists(ExlNm.Name) Then
del / remove objDoc.Bookmarks
End If
Next ExlNm
Thanks in advance!