Insert Hidden Bookmark


#1

Hi,

How do I enter a Hidden Bookmark using documentbuilder class in a word document? Below is my code that inserts bookmark but I'm not sure how to hide it so user accidently doesn't delete it. Below is my code. I'm using Aspose.word 3.2

Thanks,
Srujal Shah

documentBuilder.MoveToDocumentStart()

documentBuilder.StartBookmark(bookmarkName)

documentBuilder.Font.Size = 12

documentBuilder.Font.Bold = True

documentBuilder.Font.HighlightColor = Color.Yellow

documentBuilder.Writeln("<<<--- INSERT YOUR TEXT HERE")

documentBuilder.EndBookmark(bookmarkName)

documentBuilder.Writeln("")


#2

Hi,

Thank you for considering Aspose.

Hidden bookmarks in Word documents start with an underscore character ( _ ). So just name it something like "_hidden" and you'll get it.


#3

It worked! Thanks.