A
arne
My code deletes the enclosed text [enclosed bookmarktext] and the
bookmarkname, also in header and footer and let
other NOT enclosed bookmarks live. That i the meaning.
Problem: it stops in the footer if I have an enclosed bookmark in the
header., and I want it to
end when finished at the beginning of the document,; Selection.HomeKey
Unit:=wdStory
What have I missed here?
Sub deleteenclosedbookmarks()
' On Error Resume Next
Dim allbookmks As Bookmark
For Each allbookmks In ActiveDocument.Bookmarks
If Len(allbookmks .Range) > 0 Then
allbookmks .Range.Text = Delete
Else
End If
Next allbookmks
End Sub
bookmarkname, also in header and footer and let
other NOT enclosed bookmarks live. That i the meaning.
Problem: it stops in the footer if I have an enclosed bookmark in the
header., and I want it to
end when finished at the beginning of the document,; Selection.HomeKey
Unit:=wdStory
What have I missed here?
Sub deleteenclosedbookmarks()
' On Error Resume Next
Dim allbookmks As Bookmark
For Each allbookmks In ActiveDocument.Bookmarks
If Len(allbookmks .Range) > 0 Then
allbookmks .Range.Text = Delete
Else
End If
Next allbookmks
End Sub