Skip to main content
OCLC Support

PrintLabelEx

Find the syntax, use, parameters, return values, and an example for the PrintLabelEx macro command in Connexion client.
Syntax BOOL = CS.PrintLabel Ex (sHoldingCode, sSpine, sCall1, sAuthor1, sTitle1, sCall2, sAuthor2, sTitle2, nCopies, sConstant1, sNumbers1, sConstant2, sNumbers2)
Use to Allows you to edit data for a label for the current record before printing the label.

Same as using the menu command View > Label to open a label for the current record for editing.
Parameters
  • For sHoldingCode, enter the holding library code used to print the label, enclosed in quotation marks (determines the input stamps for the label).
  • Enter the parameter sSpine to supply the text to print on the spine label.
  • Enter the parameter sCall1 to supply the call number to print on the pocket label.
  • Enter the parameter sAuthor1 to supply the author to print on the pocket label.
  • Enter the parameter sTitle1 to supply the title to print on the pocket label.
  • Enter the parameter sCall2 to supply the call number to print on the second pocket label.
  • Enter the parameter sAuthor2 to supply the author to print on the second pocket label.
  • Enter the parameter sTitle2 to supply the title to print on the second pocket label.
  • For nCopies, enter the number of copies of the label to print (1 to 999). Default: 1 copy.
  • For sConstant1, enter text to print on the label to identify multiple copies or parts, enclosed in quotation marks. Use letters, numbers, and punctuation marks.
  • For sNumbers1, enter numbers to appear on the label with print constant 1, enclosed in quotation marks. Use only numbers, commas, hyphens, and quotation marks.
  • For sConstant2, enter additional text to print on the label, enclosed in quotation marks. Use letters, numbers, and punctuation marks.
  • For sNumbers2, enter numbers to appear on the label with print constant 2, enclosed in quotation marks. Use only numbers, commas, hyphens, and quotation marks.
Comments
  • You must have a record open to use this macro command.
  • Use this command with GetLabelSpine, GetLabelCallNumber, GetLabelAuthor, and GetLabelTitle to retrieve and edit data for the content of a label before printing.
  • Leave pocket 2 parameters empty to duplicate pocket 1 parameters (same as selecting Mirror Edits in View > Label).
  • You must start the label printing process with StartLabelBatch and end the process with EndLabelBatch when you use the PrintLabelEx command.
  • Printing setup options in Tools > Options > Printing apply.
  • Uses your default printer in Windows or the label printer you select in Tools > Options > Printing.

    See Print labels for more information about how the client produces labels.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Dim sSpine as String
     Dim sCallNumber1 as String
     Dim sAuthor1 as String
     Dim sTitle1 as String
     Dim sCallNumber2 as String
     Dim sAuthor2 as String
     Dim sTitle2 as String

     Set CS = GetObject(,“Connex.Client”)
     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If

     CS.Search “WC”, “gon,wi,th,w”

     CS.GetLabelSpine “ZMYA”, sSpine
     CS.GetLabelCallNumber “ZMYA”, sCallNumber1
     CS.GetLabelAuthor(sAuthor1)
     CS.GetLabelTitle(sTitle1)

     sCallNumber2 = sCallNumber1
     sAuthor2 = sAuthor1
     sTitle2 = sTitle1

     ‘Edit label fields as required here
     batchStarted = CS.StartLabelBatch

     If batchStarted = True Then
          CS.PrintLabelEx “ZMYA”, sSpine, sCallNumber1, sAuthor1, sTitle1,
          sCallNumber2, sAuthor2, sTitle2, 2, “Part”, “1,2”, “Copy”, “1,2”
          CS.EndLabelBatch
     End If

End Sub

What this example does
  • Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
  • Searches WorldCat for record number 1.
  • Starts a label batch print and prints two copies of labels for record number 1 for holding library code ZMYA, based on spine, call number, author, and title text you edited, with the following print constants:
    • Part 1 Copy 1
    • Part 1 Copy 2
    • Part 2 Copy 1
    • Part 2 Copy 2