Skip to main content

Read-Document

Command Description

Read the contents of a Word document

Command Prototype

sRet = Word.ReadAll(objWord)

Parameter Description

ParameterRequiredTypeDefaultDescription
objWordTrueexpressionobjWordWord document object

return

sRet,The variable used to save the output of the command.

Demo

/************************************Read Document************ **************************** 
Command prototype:
Word.ReadAll(objWord)
Input parameters:
objWord--Word Word document object
Outgoing reference:
sRet --The return value after the command is run
*********************************************************************************/
Dim objWord
objWord = Word.Open('''C:\Users\Administrator\Desktop\Standardization Implementation Notes.docx''',"xw4131221","",true)
sRet = Word.ReadAll (objWord)
TracePrint ($ PrevResult)