BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

BookmarkDepth Property

Gets/Sets a string defining Word styles and bookmark depth mapping.

Type

String

Remarks

This property will take effect only when the ConvertBookmarks property is set to True. Numbers defining bookmark levels must be equal to or larger than one. Word style names must not repeat in the string. The string must not start or end with the delimiter. When this property is empty, the default style mapping (Heading one through nine will be mapped to level one through nine) will be used. Therefore, empty string is functionally eqivalent to:

Heading 1|1|Heading 2|2|Heading 3|3|Heading 4|4|Heading 5|5|Heading 6|6|Heading 7|7|Heading 8|8|Heading 9|9

Note: If you use non-English version of Microsoft Word, then you may need to replace the word "Heading" with its localized version.

Example Usage

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.WordPrintJob

oPrintJob.ConvertBookmarks = True
' Make words or phrases with "Heading 1" style to
' become top level bookmarks, and words or phrases
' with "Heading 2" style to become level two bookmarks.
oPrintJob.BookmarkDepth = "Heading 1|1|Heading 2|2"

' Set Add-in execution timeout value to 2 minutes
oPrintJob.AddInTimeout = 2 * 60000

oPrintJob.PrintOut "C:\test\input.doc", "C:\test\output.pdf"