I have a doc with a lot of bookmarks that I need to update automatically via VBA Excel, so I have bullets point that go with bookmarks, as below.
- Fixe_2
- Fixe_3:
o Fixe_4
o Fixe_5`
But when I update the bookmarks it overlaps for example for fix_4 = blablalbla
the bookmarks of fix_5 take position on the bullet point that was fix_4.
`- Fixe_2
- Fixe_3:
o BalblablaFixe_5`
Here is the simplified code I use to update my bookmarks
`
If Range("G10") = "Fixe" Then
wdDoc.Bookmarks("Fixe_2").Range.Text = "Blablabla "
wdDoc.Bookmarks("Fixe_3").Range.Text = " Blablabla"
wdDoc.Bookmarks("Fixe_4").Range.Text = " Blablabla "
wdDoc.Bookmarks("Fixe_5").Range.Text = " Blablabla "
Else
wdDoc.Bookmarks("Fixe_2").Range.Text = ""
wdDoc.Bookmarks("Fixe_3").Range.Text = " "
wdDoc.Bookmarks("Fixe_4").Range.Text = " "
wdDoc.Bookmarks("Fixe_5").Range.Text = " "
New contributor
user25168235 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.