How to update Include Text field in Word document using WPF DocIO ?
No, it is not possible to directly update the Include Text field in a Word document using Essential® DocIO. However, you can create a helper class to explicitly update the Include Text field in your sample application using Essential® DocIO.
The following sample demonstrates how to implement a helper class to update the Include Text field using Essential® DocIO.
https://www.syncfusion.com/downloads/support/directtrac/general/IncludeTextUpdate_WPF-1385488466.zip
This sample contains a helper class, “IncludeTextFieldUpdateHelper.cs,” which internally updates the Include Text field. The following table provides the API details of the IncludeTextFieldUpdateHelper class.
Properties Description:
Property Name | Type | Description |
---|---|---|
MainDocument | WordDocument | Specifies the Word document instance that contains the Include Text field. |
MainDocumentFileName | string | Specifies the full path of the Word document that contains the Include Text field. |
IsUpdateSpecifiedBookmark | bool | Set to true to replace the Include Text field with specified bookmark contents; otherwise, the whole document content is replaced.
Note: If the Include Text field does not contain any valid bookmark in the specified document, an error message, “Error! BookmarkName not defined,” will be displayed.
|
Method Description:
Method Name | Return Type | Description |
---|---|---|
UpdateIncludeTextField() | void | Updates the Include Text field in the Word document. Note: If the Include Text field does not contain any valid file name, an error message, “Error! Not a valid filename,” will be displayed instead of the Include Text field.
|
I hope you enjoyed learning about how to update the Include Text field in a Word document using WPF Essential® DocIO.
You can refer to our WPF Essential® DocIO feature tour page to learn about its other groundbreaking features and documentation, and how to quickly get started with configuration specifications. You can also explore our examples to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to explore our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!