How To Print Labels In Colors By Vba Programming ? 追蹤

0
Avatar
Legacy Poster

I’m using this VBA code (ACCESS) to print labels.
But although the printer is a color printer set to “color”, the printed label is only black & white. The same printer with the same parameters give a color label, when used directly with Bartender 9.3.

As somebody an idee ?

Thanks


Michel


Public Function imprimer(nbcopies, refsurg, Lot, ModeleBt, Imprimante)
Dim MyApp As BarTender.Application
Dim MyDoc As New BarTender.Format
Dim MyVars As BarTender.SubString
Dim Str1, Str2 As String


Set MyApp = CreateObject("BarTender.Application")
MyApp.Visible = False

Str1 = ModeleBt
Str2 = Imprimante

Set MyDoc = MyApp.Formats.Open(Str1, False, Str2)

MyDoc.SetNamedSubStringValue "NumLot", Lot


MyDoc.Databases.QueryPrompts.GetQueryPrompt("Invite1").Value = refsurg

MyDoc.IdenticalCopiesOfLabel = nbcopies

MyDoc.PrintOut

MyApp.Quit (BarTender.BtSaveOptions.btDoNotSaveChanges)
Set MyDoc = Nothing
Set MyApp = Nothing

End Function

2 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

I assume the document design itself has some colour elements in it?

Assuming yes to the above question, make sure that you set the printer driver settings via the BarTender "Print" dialog and "Document Properties" button so that the label will indeed print in colour. After making those settings save the label document to make sure those settings are saved and embedded in the BarTender file and are thus used when opened in any kind of context.
0
Avatar
Legacy Poster
評論操作 永久連結

Thank you very much,

Your suggestion solve my problem.

Michel

登入寫評論。