Query Prompts Not Detected 追蹤

0
Avatar
Legacy Poster

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

1 意見

0
Avatar
Legacy Poster
評論操作 永久連結

Can you attach the file? (More Reply Options)

登入寫評論。