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#
public char DataSourceSeparator{ get; set; }
{signature}
{signature:
}
Signature
vb.net
vb.net
Public Property DataSourceSeparator() As Char
{signature}
{remarks}The {{DataSourceSeparator}} property must be set *before* [Open|WordTemplate.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}
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_@$#()[],
{code}

The

space

character

cannot

be

used

as

a

data

source

separator.

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

Example
Code Block
csharp
csharp
titleC#
          
WordTemplate oWW = new WordTemplate();
          oWW.DataSourceSeparator = "-";
          oWW.Open("Template.doc");
          ...
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}
          
Dim oWW As New WordTemplate()
          oWW.DataSourceSeparator = "-"
          oWW.Open("Template.doc")
          ...
        
{code} {example}