Query Prompts Not Detected
I am using BarTender version 9.10 with Visual Basic.
Here is the code for each label:
Dim btFormat As LabelFormatDocument
btEngine.Start()
btFormat = btEngine.Documents.Open(filepath + "\SalesOrder.btw")
Dim SalesOrderPrompts As QueryPrompts = btFormat.DatabaseConnections.QueryPrompts
For Each queryprompt As QueryPrompt In SalesOrderPrompts
SalesOrderPrompts(queryprompt.Name).Value = promptValue
Next queryprompt
btFormat.PrintSetup.PrinterName = printerName
btFormat.PrintSetup.IdenticalCopiesOfLabel = 1
btFormat.Print()
btFormat.Close(SaveOptions.DoNotSaveChanges)
The label is opened correctly and the database connections are read correctly. However, btFormat.DatabaseConnections.QueryPrompts always comes out empty despite that the file definitely has one working query prompt. The label then fails to print.
The label prints just fine if I print it through bartender and enter the query prompt data myself, but that is obviously not ideal for automation.
Can anyone see where this is going wrong?
Thanks
Kate
0
-
Can you attach the file? (More Reply Options)
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar