Job.PrinterSerializedCopiesType Property |
Sets and returns how the number of items printed in a serialization sequence is determined in a printer code template (the value of the PrinterSerializedCopies property).
Job.PrinterSerializedCopiesType = BtPrinterSerializedCopiesValueType
Where BtPrinterSerializedCopiesValueType can be one of the following constants:
btPrinterSerializedCopiesConstant: The value of the PrinterSerializedCopies property will be treated as a literal; has a value of 0.
btPrinterSerializedCopiesFromTemplateField: The value of the PrinterSerializedCopies property will be treated as a placeholder that the print system will replace with an actual value; has a value of 1.
btPrinterSerializedCopiesFromPrintDialogCopies: The value of the PrinterSerializedCopies property will be determined by the value set in the Print Dialog; has a value of 2.
btPrinterSerializedCopiesNotSupported: The value of the PrinterSerializedCopies property will not be set; has a value of 3.
Version |
BarTender 7.75 or higher |
Edition |
Automation, Enterprise Automation |
'Declare a BarTender application variable
Dim btApp As BarTender.Application
'Declare a BarTender document variable
Dim btFormat As BarTender.Format
'Declare a BarTender printer code template variable
Dim btPCT As BarTender.PrinterCodeTemplate
'Declare a BarTender job variable
Dim btJob As BarTender.Job
'Declare a BarTender messages variable to hold all messages
Dim btMessages As BarTender.Messages = Nothing
'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 printer code template variable
btPCT = btFormat.PrinterCodeTemplate
'Set the job variable
btJob = btPCT.Job
'Set the serialization value type property
btJob.PrinterSerializedCopiesType = BarTender.BtPrinterSerializedCopiesValueType.btPrinterSerializedCopiesConstant
'Set the serialization property value
btJob.PrinterSerializedCopies = "3"
'Export the printer code template
btPCT.Export("SAPscript-ITF", BarTender.BtPctExportType.btPctExportSeparate, "c:\Printer Code Templates\FormatTemplate.prn", "c:\Printer Code Templates\DataTemplate.prn", btMessages)
'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;
// Declare a BarTender printer code template variable
BarTender.PrinterCodeTemplate btPCT;
// Declare a BarTender job variable
BarTender.Job btJob;
// Declare a BarTender messages variable to hold all messages
BarTender.Messages btMessages;
// Declare an object variable
System.Object obj = null;
// 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 printer code template variable
btPCT = btFormat.PrinterCodeTemplate;
// Set the job variable
btJob = btPCT.Job;
// Set the printer serialization type property
btJob.PrinterSerializedCopiesType = BarTender.BtPrinterSerializedCopiesValueType.btPrinterSerializedCopiesConstant;
// Set the printer serialization property
btJob.PrinterSerializedCopies = "3";
// Export the printer code template
btPCT.Export("SAPscript-ITF", BarTender.BtPctExportType.btPctExportSeparate, "c:\\Printer Code Templates\\FormatTemplate.prn", "c:\\Printer Code Templates\\DataTemplate.prn", ref obj);
// Set the messages variable to the object
btMessages = obj as BarTender.Messages;
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);