Skip to main content

Close-Document

Command Description

Close an opened Word document

Command Prototype

Word.Close(objWord,bQuit)

Parameter Description

ParameterRequiredTypeDefaultDescription
objWordTrueexpressionobjWordWord document object
bQuitTruebooleanTrueWhether to close the Word process

Demo

/************************************Close document************** ************************ 
Input parameters:
objWord--Word document object
bQuit--whether to close the Word process
*********************************************************************************/
Dim objWord
objWord = Word.Open('''C:\Users\Administrator\Desktop\Standardization Implementation Notes.docx''',"xw4131221","",true)
Word.Close(objWord,true)