Articles in this section
Category / Section

How to update Include Text field in Word document using WinForms DocIO ?

4 mins read

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-Windows1355102516.zip

This sample contains a helper class, “IncludeTextFieldUpdateHelper.cs,” which internally updates the Include Text field.

The following tables contain the properties and method descriptions of the IncludeTextFieldUpdateHelper class.

Properties Table:

Property Name

Type

Description

MainDocument

WordDocument

Gets or sets the Word document instance which contains the Include Text field.

MainDocumentFileName

string

Gets or sets the file name of the word document with full path.

IsUpdateSpecifiedBookmark

bool

Gets or sets a value indicating whether to replace the Include Text field with specified bookmark contents or the whole document content.

 

Note:

If the bookmark defined in the Include Text field is not valid, the error message “Error! BookmarkName not defined” will replace the Include Text field instead.

 

Method Table:

Method Name

Return Type

Description

UpdateIncludeTextField()

void

Updates the Include Text field in the Word document.

 

Note:

If Include Text field does not contain any valid file name, then error message “Error! Not a valid filename.” will be replaced instead of Include Text field.

 

Conclusion

I hope you enjoyed learning about how to update the Include Text field in a Word document using WinForms Essential® DocIO.

You can refer to our WinForms Essential® DocIO feature tour page to learn about its other groundbreaking features, documentation, and how to quickly get started with configuration specifications. You can also explore our example 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 check out 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!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied