Open Method
Syntax 1: Open the specified file and add it to the document set. Returns the Document Object.
Syntax 2: Open the specified object. When applied to a subfile or recentfile object, syntax 2 returns a Document Object.
Syntax 1
Expression. Open (filename, confirmconversions, readonly, addtorecentfiles, passworddocument, passwordtemplate, revert, writepassworddocument, writepasswordtemplate, format, encoding, visiable)
Syntax 2
Expression. Open
Expression syntax 1: required. This expression returns a file object.
Syntax 2: required. This expression returns an oleformat, recentfile, sub-document, or version object.
Filename is required. ).
Confirmconversions variant type. Optional. The convert file dialog box is displayed. If the file is not in Microsoft Word format.
Readonly variant type. Optional. You can only open the file in read-only mode.
Addtorecentfiles variant type. Optional. Add the real file name to the list of recently used files at the bottom of the File menu.
Passworddocument variant type, optional. The password for opening the file.
Passwordtemplate variant type, optional. In the open template password.
Revert variant type. Optional. Control what will happen if the name is an open document file name. Abandon any unsaved changes in the open document and re-open the file. False activation of open documents.
Writepassworddocument variant type. Optional. Used to save the change password for the document.
Writepasswordtemplate variant type. Optional. The password used to save and change the template.
Format variant type. Optional. This file converter is used to open this document. It can be one of the following wdopenformat constants: wdopenformatallword, wdopenformatauto, wdopenformatdocument, wdopenformatencodedtext, wdopenformatrtf, wdopenformattemplate, wdopenformattext, plain, or wdopenformatwebpages. The default value is wdopenformatauto.
To specify an external file format, use the openformat attribute 1 fileconverter object to determine the value to be used.
Encoding variant type. Optional. The file encoding (code page or character set), used by Microsoft Word when you view the saved document. It can be any valid msoencoding. For a list of valid msoencoding constants, see the Visual Basic Editor Object Browser. The default is the system code page. Read/write dragon.
Visiable variant type. Optional. True. If the file is opened, it is displayed in a visible window. The default value is true.