Open Method

Applies To

Binder object.

Description

Opens either an existing binder or a new binder based on an existing binder template.

Note The preferred method for opening an existing binder is to use the GetObject function, and then to use the Visible method if you want to display the binder to the user. If you use the Open method instead of the GetObject function, use the Open method immediately after using CreateObject; otherwise, an error will occur.

Syntax

expression.Open(FileName, OpenAsTemplate)

expression Required. An expression that returns a Binder object.

FileName Required String. The name of the file to be opened.

OpenAsTemplate Optional Variant. True to open the file as a new binder based on the specified binder template. False (or omitted) to open the file as a binder file.

Example

This example opens Binder2.obd. The example adds a new Word document to the binder and then makes the binder visible.

Set myBinder = CreateObject("OfficeBinder.Binder")
With myBinder
    .Open "binder2.obd"
    .Sections.Add Type:="Word.Document"
    .Visible = True
End With