WordDocumentOpenDataTag Method |
Namespace: Aceoffix.WordWriter
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");