Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Use DataSourceSeparator to set the character that separates a data source name from a column name in a data marker. '.' is the default data source separator.

Signature
C#
C#
<table class="diff-macro"><thead><tr><th class="diff-macro-title">unmigrated-wiki-markup</th></tr></thead><tbody><tr><td class="diff-macro-body"><pre>
 public char DataSourceSeparator{ get; set; }
</pre></td></tr></tbody></table>
Signature
vb.net
vb.net
Public <p>Public Property DataSourceSeparator() As Char</p>Char
Remarks

The DataSourceSeparator property must be set before Open is called because the merge field collection is parsed when the document is opened.

The following characters cannot be used as data source separators:

Code Block

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_@$#()[],

The space character cannot be used as a data source separator.

Example
Code Block
csharp
csharp
titleC#
            WordTemplate oWW = new WordTemplate();
          oWW.DataSourceSeparator = "-";
          oWW.Open("Template.doc");
          ...
        
Code Block
vb.net
vb.net
titlevb.net
            Dim oWW As New WordTemplate()
          oWW.DataSourceSeparator = "-"
          oWW.Open("Template.doc")
          ...