Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Jason.Rugg
460 Views, 8 Replies

See code below, anyone know why I am not getting B&W output???

See code below, anyone know why I am not getting B&W output???

 

'[
Dim oDrgDoc As DrawingDocument
oDrgDoc = ThisApplication.ActiveDocument

' Set reference to drawing print manager' DrawingPrintManager has more options than PrintManager' as it's specific to drawing document
Dim oDrgPrintMgr As DrawingPrintManager
oDrgPrintMgr = oDrgDoc.PrintManager
pdfname = ThisDoc.FileName(False)
filePath = ThisDoc.Path
' Set the printer name' comment this line to use default printer or assign another one
oDrgPrintMgr.Printer = "Microsoft Print to PDF"

'Set the paper size , scale and orientation
oDrgPrintMgr.ScaleMode = kCustomScale
oDrgPrintMgr.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale
'oDrgPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeLedger
oDrgPrintMgr.PaperSize = kPaperSizeTabloid
'oDrgPrintMgr.PaperSize = 14338
oDrgPrintMgr.PrintRange = 14082 'kPrintAllSheets
oDrgPrintMgr.Orientation = kLandscapeOrientation
'oDrgPrintMgr.PaperSource = 2
oDrgPrintMgr.AllColorsAsBlack = True
Dim doc = ThisDoc.Document
doc.SaveAs(filePath + "\" + pdfname + ".pdf", True)
'oDrgPrintMgr.SubmitPrint
']