Newbie question: Active.Documents.Bookmarks.Show.Hidden not found

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top