Open-Document
Command Description
Open Word document
Command Prototype
objWord = Word.Open(sPath,sAccessPwd,sChangePwd,bVisible)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sPath | True | path | '''C:\Users''' | The path to the Word document |
sAccessPwd | True | string | "" | The password required for accessing a Word file |
sChangePwd | True | string | "" | The password required for editing a Word file |
bVisible | True | boolean | True | Word file visibility when opens. False is invisible. True is visible. Default is true |
return
objWord,The variable used to save the output of the command.
Demo
/************************************Open Document************** ************************
Command prototype:
Word.Open(sPath,sAccessPwd,sChangePwd,bVisible)
Input parameters:
sPath--Word document file path
sAccessPwd--password required to access Word files
sChangePwd--password required when editing Word files
bVisible--Whether the Word document is visible when it is opened
Outgoing reference:
objWord--the return value after the command is run
*********************************************************************************/
Dim objWord
objWord = Word.Open('''C:\Users\Administrator\Desktop\Standardization Implementation Notes.docx''',"","",true)