Format Object

ClosedDescription

Represents a BarTender document. Format objects hold the data and properties for a document that may or may not be open in BarTender.

For more information, refer to Using the Format Object.

ClosedRequirements

Version

BarTender 6.00 or higher

Edition

Automation, Enterprise

ClosedMethods

Name

Description

Activate

Assigns focus to the document's window.

Close

Closes the BarTender document.

ExportPrintPreviewRangeToImage

Exports an image for specified pages of a document's print preview.

ExportPrintPreviewToImage

Exports an image for a print preview page.

ExportPromptToXML

Deprecated. Exports the user prompt data as an XML packet.

ExportToClipboard

Copies a bitmap representation of the document to the Clipboard.

ExportToFile

Creates an image of the document and saves it to an image file.

GetNamedSubStringValue

Returns the value of a named data source.

GetPrompt

Returns the value of a specified data entry control.

Print

Prints the document and throws error messages as detected.

PrintOut

Prints the document.

Save

Saves the document.

SaveAs

Saves the document to a different file.

SetAvailableTemplateFieldNames

Sets the template field name and sample data string list.

SetNamedSubStringValue

Sets the value of a named data source.

SetPrompt

Sets the user input data for a single data entry control.

SetPrompts

Sets the user input data for multiple data entry controls.

SpecifyLabelFormatPassword

Enters a password for the active BarTender document.

ClosedProperties

Name

Description

AutoPrintAgain

Sets and returns the print option to automatically print again.

BaseName

Returns the base name.

Comment

Sets and returns the comments for the document.

Directory

Returns the directory of the BarTender document.

EnablePrompting

Sets or returns the data entry settings in the active document.

Encryption

Sets or returns the encryption key of the active document.

FileName

Returns the document's file name.

IdenticalCopiesOfLabel

Sets and returns the number of copies that are set in the Print dialog.

IsModified

Returns whether the document has been modified.

JobName

Sets and returns the print job name.

MeasurementUnits

Sets and returns the units of measurement in the document.

NamedSubStrings

Returns a reference to the NamedSubStrings collection object.

NumberSerializedLabels

Sets and returns the number of serial numbers to print.

Objects

Returns a reference to the DesignObjects collection object.

PageSetup

Returns a reference to the PageSetup object.

PaperTray

Sets and returns the paper tray that is used to print the job.

Printer

Sets and returns the name of the printer.

PrinterCodeTemplate

Returns a reference to the PrinterCodeTemplate object.

PrinterFile

Sets and returns the file name to be used when BarTender prints to a file.

PrintSetup

Returns a reference to the PrintSetup object.

PrintToFile

Sets and returns the print to file option.

PrintToFileLicense

Sets and returns the print-to-file license.

PromptValues

Returns the names and values of prompt objects in XML format.

RecordRange

Sets and returns the record range string that determines which records are printed.

SaveAsVersion

Sets and returns the version of BarTender to which the document is saved when the Save or SaveAs methods are used.

SelectRecordsAtPrint

Sets or returns the "Select Records At Print Time" flag to prompt the user to select records to be printed.

SupportsSetIdenticalCopies

Returns whether the document supports identical copies.

SupportsSetSerializedCopies

Returns whether the document supports serialization.

Title

Returns the title of the BarTender document.

UseDatabase

Sets or returns the current setting of the document option to use an attached database for printing.

UsedNames

Returns a list of database field names, share names, or template names that are used on the templates in the document.

UsedNamesSampleData

Sets or returns the sample data for an object whose source is a database field.

ViewRecordNavigator

Returns a reference to the ViewRecordNavigator object.

ClosedEvents

Name

Description

OnNewPrintJob

Occurs when a new print job is created.

ClosedCollections

Name

Description

Databases

Manages the list of databases that are defined for a BarTender document.

NamedSubStrings

Manages the list of named data sources that are assigned to all objects on the templates.

Related Topics