G
gh
Hi,
I'm not programming just tried to use the macro from MS to remove
"hidden bookmarks".
The code is:
---------------------
Sub StripHiddenBookmarks()
Dim i As Long
ActiveDocument.Bookmarks.ShowHidden = True
For i = ActiveDocument.Bookmarks.Count To 1 Step -1
If Left$(ActiveDocument.Bookmarks(i).Name, 4) = "_Toc" Then
ActiveDocument.Bookmarks(i).Delete
End If
Application.ActiveDocument.UndoClear
Next i
ActiveDocument.Bookmarks.ShowHidden = False
End Sub
-----------------
It does not run, it stops at AcitveDocument with the messsage: compile
error expected function or variable.
Thanks for help
regards
Georg
I'm not programming just tried to use the macro from MS to remove
"hidden bookmarks".
The code is:
---------------------
Sub StripHiddenBookmarks()
Dim i As Long
ActiveDocument.Bookmarks.ShowHidden = True
For i = ActiveDocument.Bookmarks.Count To 1 Step -1
If Left$(ActiveDocument.Bookmarks(i).Name, 4) = "_Toc" Then
ActiveDocument.Bookmarks(i).Delete
End If
Application.ActiveDocument.UndoClear
Next i
ActiveDocument.Bookmarks.ShowHidden = False
End Sub
-----------------
It does not run, it stops at AcitveDocument with the messsage: compile
error expected function or variable.
Thanks for help
regards
Georg