Hi!
Im trying to place bookmarks after each other, now im using this code: But it just ends up with all bookmarks getting posted on the same spot and then only the last entry is visible.
How do i post bookmarks after another?
Here is my code..
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text1"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
ActiveDocument.Bookmarks(text1).Range.Select
Selection.InsertAfter
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text2"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
ActiveDocument.Bookmarks(text2).Range.Select
Selection.InsertAfter
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text3"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text4"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text5"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text6"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text7"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
Selection.InsertBreak Type:=wdPageBreak
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text8"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
Im trying to place bookmarks after each other, now im using this code: But it just ends up with all bookmarks getting posted on the same spot and then only the last entry is visible.
How do i post bookmarks after another?
Here is my code..
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text1"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
ActiveDocument.Bookmarks(text1).Range.Select
Selection.InsertAfter
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text2"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
ActiveDocument.Bookmarks(text2).Range.Select
Selection.InsertAfter
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text3"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text4"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text5"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text6"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text7"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
Selection.InsertBreak Type:=wdPageBreak
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="text8"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With