MS Word Functions in the Office Library
You can review the list of available MS Word Functions and properties in the Office Library.
MS Word Functions
Add Table Last Row: Adds a new row to the end of the specified table in the Word document. This function was added in version 7.2.
Add textuals to the beginning of a Word document: Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it.
Add textuals to the beginning of a Word document and save:
Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it in a specified target Word document. The target document should be specified by path and name without format. It is saved in wdFormatDocument (*.doc).
For example, if the target document is specified as C:\Temp\Office\Test, the document is saved as Test.doc under the specified folder.
Add textuals to the beginning of a Word document and save in a specific format:
Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it in a specified target Word document in a specified format. The target document should be specified by its full path without format in the wordDocumentToSave parameter. Format should be specified in wordDocumentSaveFormat according to Microsoft WdSaveFormat enumeration. (This link was active at the time of this publication. It is not maintained by NICE.)
If the specified format is not supported (for example, wdFormatDocumentDefault is DOCX for Microsoft Office Word 2007 - 2016), the document is saved in DOC format by default.
The wordDocumentToSaveFormat parameter receives formats that listed in the MSDN by the link: https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.wdsaveformat.aspx
In the example below, the parameters definition is shown in the project that is already run by Real-Time Client. DocToOpen.docx document is taken, some text is added to the document, and it saved as DocSaved.txt document:
Clear Table Content:Clears the content of the specified table in the Word document. This function was added in version 7.2.
Delete Table:Deletes the specified table in the Word document. This function was added in version 7.2.
Delete Table Row:Deletes the specified row in the given table in the Word document. This function was added in version 7.2.
Get Active Document Name: Retrieves the name of an active Word document.
Get Document Field Value:
Retrieves the value of a specified form field from a specified Word document. The document must be open before running this function. In the Document Name parameter, specify the name of the document (without a path) as it appears in the title bar of MS Word.
For example, if the title is WordFormSample.docx [Compatibility Mode] – Word, then specify WordFormSample.docx [Compatibility Mode] in the parameter.
To get form field names, run the Get Document Fields Name function and then use the returned field names in the Field Name parameter.
Get Document Fields Names:
Retrieves the names of all the form fields from a Word document. The document must be open before running this function. In the Document Name parameter, specify the name of the document (without a path) as it appears in the title bar of MS Word.
For example, if the title is WordFormSample.docx [Compatibility Mode] – Word, specify WordFormSample.docx [Compatibility Mode] in the parameter.
Get Document Text: Retrieves the text from a specified Word document. Document Name is the complete path of the file, including extension. Example: C:\temp\MyFile.docx.
Get Documents Names: Retrieves a list of Word document names that are currently open.
Get Table Cell Text:Gets text from the specified cell in the table of the Word document. This function was added in version 7.2.
Get Table Cells Count in Row:Gets the number of cells in the specified row in the table of the Word document. This function was added in version 7.2.
Get Table Content:Returns a collection of rows that represents the content of the table in the Word document. This function was added in version 7.2.
Get Table Rows Count:Gets the number of rows in the specified table in the Word document. This function was added in version 7.2.
Get Tables Count:Gets a count of the tables in the Word document. This function was added in version 7.2.
Insert Table Row Above:Inserts a new row with the specified number of cells above the existing row in the table of the Word document. This function was added in version 7.2.
Insert Table Row Below:Inserts a new row with the specified number of cells below the existing row in the table of the Word document. This function was added in version 7.2.
Replace Text in Active Word Document:Searches for the specified text in the active Word document and replaces it with the given text.
Set Table Cell Text : Sets text into the specified cell in the table of the Word document. This function was added in version 7.2.
Set values into Word document bookmarks: Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves the Word document.
Set values into Word document bookmarks and save: Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves it to a target Word document in the wdFormatDocument format (DOC).
Set values into Word document bookmarks and save in a specific format:
Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves it to a target Word document in the specified format (DOC). The target document should be specified in full path format in the wordDocumentToSave parameter.
Format should be specified in wordDocumentSaveFormat according to Microsoft WdSaveFormat enumeration. (This link was active at the time of this publication. It is not maintained by NICE.)
If the specified format is not supported (for example, wdFormatDocumentDefault, that is DOCX for Microsoft Office Word 2007 - 2016), the document is saved in DOC format by default.