Format.RecordRange Property |
Sets or returns the string that specifies the range of records that will be printed.
Format.RecordRange = Range
Where Range specifies a set of records for printing.
Version |
BarTender 6.00 or higher |
Edition |
Automation, Enterprise |
Use the RecordRange property to specify a set of records for printing. Individual records are specified by number and separated by commas as in "1,3,5". A range of numbers indicated with a hyphen can be used to specify a series of consecutive records as in "3-8". The use of parenthesis can be used to specify the number of copies to be printer for each record (e.g. 3(5) will print 5 copies of record 3.
'Declare a BarTender application variable
Dim btApp As BarTender.Application
'Declare a BarTender document variable
Dim btFormat As New BarTender.Format
'Create a new instance of BarTender
btApp = New BarTender.Application
'Set the BarTender application visible
btApp.Visible = True
'Open a BarTender document
btFormat = btApp.Formats.Open("c:\Format1.btw", False, "")
'Set the RecordRange property
btFormat.RecordRange = "1-3,5(2),6"
'Print the document
btFormat.PrintOut(False, False)
'End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
// Declare a BarTender application variable
BarTender.Application btApp;
// Declare a BarTender document variable
BarTender.Format btFormat;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Set the BarTender application visible
btApp.Visible = true;
// Open a BarTender document
btFormat = btApp.Formats.Open("c:\\Format1.btw", false, "");
// Set the RecordRange property
btFormat.RecordRange = "1-3,5(2),6";
// Print the document
btFormat.PrintOut(false, false);
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
Related Topics