Click or drag to resize
WordDocumentOpenDataTag Method
Opens the specified DataTag and returns a DataTag object.

Namespace: Aceoffix.WordWriter
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public DataTag OpenDataTag(
	string DataTagName
)

Parameters

DataTagName
Type: SystemString
The name of the DataTag is the pattern string defined by user in Word document.

Return Value

Type: DataTag
Returns the DataTag object.
Remarks
The DataTag object represents all the text area matched with the specified pattern string in Word document.
Examples

The following example shows how to call the OpenDataTag method to open DataTag and fill data into the specified location of Word document.

Before running the code, please make sure that you have inserted pattern string "{CompanyName}"and "{ProductName}" into the test.doc.

Aceoffix.WordWriter.WordDocument wd = new Aceoffix.WordWriter.WordDocument();
wd.DisableWindowSelection = true;
wd.DisableWindowRightClick = true;

wd.OpenDataTag("{CompanyName}").Value = "Acesoft";
wd.OpenDataTag("{ProductName}").Value = "Aceoffix";

AceoffixCtrl1.ServerPage = "aceoffix-runtime/server.aspx";
AceoffixCtrl1.Bind(wd);
AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docReadOnly, "Tom");
See Also