How do I insert nested bookmarks to the document?
Essential DocIO supports to insert nested bookmarks to the document. Here is the code snippet to insert nested bookmarks.
C#
// Writing nested bookmarks
paragraph.AppendBookmarkStart( "Main" );
paragraph.AppendText( " Main data " );
paragraph.AppendBookmarkStart( "Nested" );
paragraph.AppendText( " Nested data " );
paragraph.AppendBookmarkStart( "NestedNested" );
paragraph.AppendText( " Nested Nested " );
paragraph.AppendBookmarkEnd( "NestedNested" );
paragraph.AppendText( " data Nested " );
paragraph.AppendBookmarkEnd( "Nested" );
paragraph.AppendText( " Data Main " );
paragraph.AppendBookmarkEnd( "Main" );
VB
' Writing nested bookmarks
paragraph.AppendBookmarkStart("Main")
paragraph.AppendText(" Main data ")
paragraph.AppendBookmarkStart("Nested")
paragraph.AppendText(" Nested data ")
paragraph.AppendBookmarkStart("NestedNested")
paragraph.AppendText(" Nested Nested ")
paragraph.AppendBookmarkEnd("NestedNested")
paragraph.AppendText(" data Nested ")
paragraph.AppendBookmarkEnd("Nested")
paragraph.AppendText(" Data Main ")
paragraph.AppendBookmarkEnd("Main")
Here is the sample.