Opening BarTender Documents |
The Application object can be used to open one or many BarTender documents. All documents are managed using the Formats collection object, which is used to open and retrieve documents, and to create new ones.
A BarTender document is opened by calling the Formats.Open method. This method returns a Format object, representing the document that was just opened. The following example demonstrates how to open a document in BarTender.
The Formats.Open method has three arguments. The first argument is required and is a string containing the path and file name of the document to open. The second argument is a Boolean: if it is true, the method will close the default blank document called "Document1" that BarTender automatically opens when it starts. It cannot close documents that have any other name. The third argument specifies a printer to use.
If you have multiple documents opened in BarTender, you can use the Formats collection object to return a reference to any opened file. A BarTender document can be identified by specifying either the file name or index identifier. You can also bring focus to an opened document using the Format.Activate method. The following example assigns the specified document (Format1.btw) to be the active file in BarTender.
Related Topics