The text of a Microsoft Word document can be extracted and stored into a Variable using VBScript.
The above can be achieved by implementing the following VBScript code into a "Run VBScript" Action:
Set Word = CreateObject("Word.Application")
'Open the Document
Set WordDoc = Word.Documents.open("%SelectedFile%")
NumberOfWords = WordDoc.Sentences.count
For i = 1 to NumberOfWords
' Close Word
'Release the object variables
Set WordDoc = Nothing
Set Word = Nothing
Should you want to save the file on a certain location, you can use the following syntax:
Note: Using the "Parse Text" or "Replace Text" Actions, you can further manipulate the extracted text.
You may have to use regular expressions to target specific text (strings). Refer to the screenshots attached for the script and actions.