Serialization And Multiple Copies From Vb6 Follow

0
Avatar
Legacy Poster

Hi:

I have written a VB6 application from which I want to print out a specified number of barcodes starting from a number that is stored in a database. Sometimes there is a requirement to print a set of duplicate or triplicate barcodes.

I have the application working by sending a print command within a loop, the loop running for the number of barcode labels specified and the number of duplicates required. The code for the loop is below:-

[code] For Z = 1 To numberToPrint [this value comes from a text box on the application form]
nextBC = firstBC + Z
Call CreateBarcode

'multiples of the barcode

For Y = 1 To Val(Form1.Combo1.Text) [choose 1,2 or 3 from a drop down list]

BtFormat.SetNamedSubStringValue "BCBarcode", bcValue
BtFormat.SetNamedSubStringValue "BCTitle", headerText
Text1.Text = Text1.Text + vbCrLf + bcValue

BtFormat.PrintOut False, False [send the print command to BarTender]
Next Y
Next Z[/code]

Now this is not a very elegant solution as when printing hundreds of barcodes the print buffer overflows.

My question is :-

Can I send a Print command to BarTender specifying the following

eg. Assume the current Barcode number in the database is 5000 and I want to print Barcode labels numbering from 5000 to 6000 with 3 copies of each barcode (total 3000 labels)

> the start number for the barcode [5000]
> the number of duplicates to print [3]
> the number of barcodes to print (not including the duplicates) [1000]

The barcodes need to print out in the order 5000,5000,5000,5001,5001,5001,5002,5002,5002 etc,etc. as they do in the code example above.

Any help would be appreciated.

4 comments

0
Avatar
Philip Dea
Moderator
Comment actions Permalink

If I understand correctly, you can simply do the following:
1) In your label, make your barcode serialized and give it a share name. e.g., BCValue
2) From "File > Print" menu, set both "number of copies" and "number of serialized labels" to be data sourced and assign share name. e.g., NumCopies and NumSerialized
3) In your code, simply set BCValue to the start value in your database (ie., 5000). Set NumCopies to 3 and NumSerialized to 1000.
4) Print
You are only issuing a single print command w/o any loops. This will allow BarTender to optimize the printer code.

Pseudo code to print labels 5000, 5000, 5000, 50001, 50001, 5001, etc., below:

$btapp = ObjCreate("Bartender.Application")
$btapp.visible =True
$btFormat = $btApp.Formats.Open("F:\SerializationVB.btw", False, "")
$btFormat.SetNamedSubStringValue( "BCValue", "5000" )
$btFormat.SetNamedSubStringValue( "NumCopies", "3" )
$btFormat.SetNamedSubStringValue( "NumSerialized", "1000" )
$btFormat.PrintOut(False, False)
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='Philip D - Seagull Support' timestamp='1317869351' post='759']
If I understand correctly, you can simply do the following:
1) In your label, make your barcode serialized and give it a share name. e.g., BCValue
2) From "File > Print" menu, set both "number of copies" and "number of serialized labels" to be data sourced and assign share name. e.g., NumCopies and NumSerialized
3) In your code, simply set BCValue to the start value in your database (ie., 5000). Set NumCopies to 3 and NumSerialized to 1000.
4) Print
You are only issuing a single print command w/o any loops. This will allow BarTender to optimize the printer code.

Pseudo code to print labels 5000, 5000, 5000, 50001, 50001, 5001, etc., below:

$btapp = ObjCreate("Bartender.Application")
$btapp.visible =True
$btFormat = $btApp.Formats.Open("F:\SerializationVB.btw", False, "")
$btFormat.SetNamedSubStringValue( "BCValue", "5000" )
$btFormat.SetNamedSubStringValue( "NumCopies", "3" )
$btFormat.SetNamedSubStringValue( "NumSerialized", "1000" )
$btFormat.PrintOut(False, False)
[/quote]


This is [b]exactly[/b] what I require and it works brilliantly.

Many thanks for the fantastic service and also not forgetting the fantastic software.
0
Avatar
Legacy Poster
Comment actions Permalink

Everytime I try to print more than one copy only one copy comes out..
Uninstalled printer, Reinstalled it.. Loaded new drivers on it.. Prints
copies in Excel, Powerpoint etc. Just wont print multiple copies in Word.

Repaired it first... No Success...Uninstalled Microsoft office than
reinstalled it... didnt fix it..

Need Help.. User needs to be able to print copies for meetings etc.
0
Avatar
Philip Dea
Moderator
Comment actions Permalink

[quote name='NewsEvomiDic' timestamp='1323197207' post='1233']
Everytime I try to print more than one copy only one copy comes out..
Uninstalled printer, Reinstalled it.. Loaded new drivers on it.. Prints
copies in Excel, Powerpoint etc. Just wont print multiple copies in Word.

Repaired it first... No Success...Uninstalled Microsoft office than
reinstalled it... didnt fix it..

Need Help.. User needs to be able to print copies for meetings etc.
[/quote]
Can you please describe how you are printing from BarTender to Excel, Word, etc.?

Please sign in to leave a comment.