Skip to end of metadata
Go to start of metadata

Description

Returns the names of all merge fields in the main document.
C#
public System.String[] FieldMarkers{ get; }
vb.net
Public ReadOnly Property FieldMarkers() As String()

Remarks

The main document is any part of the template that is not within a repeat block. (A repeat block is a fragment in the template document - defined by a Word bookmark - that contains merge fields and that will be repeated for each row in a data source.)

Examples

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

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

          //--- Get all the merge fields in the document.
          String[] allMergefields = oWW.FieldMarkers;
        
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 merge fields in the document.
          Dim allMergefields As String() = oWW.FieldMarkers
        
  • No labels