私のプリンタ名は\\abc\First Floor A-Block、NE04の\ abc \ FirstFloorA-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:\testdoc.prn"
'ここでは、ネットワーク上にあるプリンタの名前を付けていますが、その名前は
\ abc \ NE04の1階Aブロック:
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)
PrintDocumentを介してWord文書とそのすべてのコンテンツを印刷する方法はありますか?
ありがとう