Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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}
{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}
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_@$#()[],
{code}
 The space character cannot be used as a data source separator.


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

          WordTemplate oWW = new WordTemplate();
          oWW.DataSourceSeparator = "-";
          oWW.Open("Template.doc");
          ...
        
{code}
{code:vb.net
|title=vb.net
}

          Dim oWW As New WordTemplate()
          oWW.DataSourceSeparator = "-"
          oWW.Open("Template.doc")
          ...
        {code}

{example}
Signature
C#C#
Wiki Markup
{description}
{excerpt}Use [DataSourceSeparator|WordTemplate.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.
{excerpt}
{signature:C#}
 public char DataSourceSeparator{ get; set; }
Signature
{signature}
{signature:vb.net
vb.net
}
Public Property DataSourceSeparator() As 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
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle