Free Support Forum - aspose.com

How to check for bookmark existence

Hi,

I’m trying to find a way to check for the existence of certain bookmark within a document. In MS Word, it has something like Bookmarks.Exists(bookmark name) which returns a boolean. Is there anything like that DocumentBuilder or MailMerge?

Thanks.

Hi,

In Aspose.Word you can check existence of a bookmark by comparison Document.Range.Bookmarks[bookmarkName] with null.

Thank you for considering Aspose.