Skip to main content

Open-Document

Command Description

Open Word document

Command Prototype

objWord = Word.Open(sPath,sAccessPwd,sChangePwd,bVisible)

Parameter Description

ParameterRequiredTypeDefaultDescription
sPathTruepath'''C:\Users'''The path to the Word document
sAccessPwdTruestring""The password required for accessing a Word file
sChangePwdTruestring""The password required for editing a Word file
bVisibleTruebooleanTrueWord 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)