CMK was telling us:
CMK nous racontait que :
I have created 30 or so documents with at least 75 bookmarks in each.
Is there any way I can export a bookmark list (TXT) from each
document? I need to compare bookmarks between documents and I'm
hoping that I don't have to type them all out.
You could try a little macro like this one:
'_______________________________________
Sub TypeOutBookmarkList()
Dim MyBkmk As Bookmark
Dim MyList As String
Dim DocList As Document
Dim CurDocName As String
With ActiveDocument
If .Bookmarks.Count = 0 Then
MsgBox "There are no bookmarks in this document."
Exit Sub
End If
For Each MyBkmk In .Bookmarks
MyList = MyList & MyBkmk.Name & Chr(13)
Next
CurDocName = .Name
End With
Set DocList = Documents.Add
With DocList
.Range.Text = "Here is the list of bookmarks in " _
& CurDocName & ":" & Chr(13) & Chr(13) & MyList
.PrintOut
.Close wdDoNotSaveChanges
End With
End Sub
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org