DataTag Class |
Namespace: Aceoffix.WordWriter
The DataTag type exposes the following members.
Name | Description | |
---|---|---|
![]() | Font |
Gets the font object.
|
![]() | Name |
Gets the name of the DataTag.
|
![]() | ParagraphFormat |
Gets the ParagraphFormat object.
|
![]() | Shading |
Gets the Shading object.
|
![]() ![]() | Value |
Sets the value of the DataTag.
|
DataTag object represents all text region matching with the pattern string in Word document. You can only call the OpenDataTag(String) method to get the DataTag object.
What is the DataTag? It's the pattern string defined by user in Word document. To put it simply, DataTag is a pattern string used to locate the content in Word document.
Here is an example to clarify what is DataTag. If the developer want the product name to display at the specified position in Word document that is to be opened, he can open this Word document, insert "(ProductName)" and save the document. Thus, the DataTage "(ProductName)" is defined.
The differences between DataTag and DataRegion: In Word document, it is a one-to-one relationship between the name of DataRegion and its location, while it's a one-to-many relationship between the name of DataTag and its locations. That is to say, the DataTag with the same characteristic string will show at many locations, and the DataRegion with the same name can only show at one location.
The disadvantage of DataTag is that it only can be used to fill a document. And DataRegion can fill and create a document as well as submit what user input into DataRegion. The advantage of DataTag is that it can fill the same content repeatedly in document. On the contrary, DataRegion cannot repeat. User must set different bookmarks. It will depend on your need to use DataRegion or DataTag.