Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Returns the names of all merge fields in the specified bookmark.

Signature
C#C#
Wiki Markup
{description}
{excerpt}Returns the names of all merge fields in the specified bookmark.{excerpt}
{signature:C#}
 public System.String[] BookmarkFieldMarkers(System.String aBookmark)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function BookmarkFieldMarkers(ByVal aBookmark As String) As String()
Parameters

...

Returns

The names of all merge fields in the specified bookmark.

Remarks

Bookmarks are used to define repeat blocks. A repeat block is a fragment in the template document that contains merge fields and that will be repeated for each row in a data source.

{signature}
{parameters}
{param:aBookmark}{param}
{returns}The names of all merge fields in the specified bookmark.{returns}
{remarks}Bookmarks are used to define repeat blocks.   A repeat block is a fragment in the template document that contains merge fields and that will be repeated for each row in a data source.

{remarks}
{example}{code:csharp|title=C#}

          //--- Create the WordTemplate object.
          WordTemplate oWW = new WordTemplate();

          //--- Open a template using a string.
          oWW.Open(@"C:\template.doc");

          //--- Get all the bookmark names in the document.
          String[] allBookmarks = oWW.Bookmarks;

          //--- Get all the merge fields in the first bookmark.
          String[] someFields = oWW.BookmarkFieldMarkers(allBookmarks[0]);
        
{code}
{code:vb.net
|title=vb.net
}

          '--- Create the WordTemplate object.
          Dim oWW As New WordTemplate()

          '--- Open a template using a string.
          oWW.Open("C:\template.doc")

          '--- Get all the bookmark names in the document.
          Dim allBookmarks As String() = oWW.Bookmarks

          '--- Get all the merge fields in the first bookmark.
          Dim someFields As String() = oWW.BookmarkFieldMarkers(allBookmarks(0))
        {code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle