Articles in this section
Category / Section

How to update Include Text field in Word document using .NET WebForms 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_Web-809692794.zip

This sample contains a helper class, "IncludeTextFieldUpdateHelper.cs," which internally updates the Include Text field. The following table provides API details of the IncludeTextFieldUpdateHelper class.

Properties Description:

Property Name

Type

Description

MainDocument

WordDocument

Specify the word document instance which has the Include Text field.

MainDocumentFileName

string

Specify full path of the word document which has the Include Text field.

IsUpdateSpecifiedBookmark

bool

True to replace the Include Text field with specified bookmark contents or else the whole document content is replaced.

Note:

If the Include Text field does not contain any valid bookmark in the specified document, the 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, the error message "Error! Not a valid filename." will be displayed instead of the Include Text field.

 

 

Note:

ASP.NET applications only run on the server side, so the main document containing the Include Text field, as well as the document specified in the Include Text field, must be stored on the server's local disk. If the files are on the client side, they cannot be accessed.

 

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