我的打印机名称为:/abcFirst Floor A-Block
,在NE04上以A-Block为名称: 如何印制
Private oWord As Word.Application
Dim lobjDoc As Word.Document
Dim strFolder as String
Dim pd As New PrintDocument
Dim strPrintername as String
oWord = CreateObject("Word.Application")
oWord.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone
oWord.ActivePrinter =strPrintername
strFolder="D: estdoc.prn"
在这里,我给网络上的打印机名称,但用的是名称。
abcFirst Floor A-Block on NE04:
lobjDoc = oWord.Documents.Open(CType(strFolder, Object))
lobjDoc.PageSetup.FirstPageTray = Word.WdPaperTray.wdPrinterAutomaticSheetFeed
lobjDoc.PageSetup.OtherPagesTray = Word.WdPaperTray.wdPrinterAutomaticSheetFeed
lobjDoc.PrintOut(Background:=False, Append:=False, OutputFileName:=strFolder, PrintToFile:=True) here its giving error about printer settings
lobjDoc.Close(SaveChanges:=False)
是否可通过
感谢