Aleksandra
New Member
- Joined
- Sep 30, 2010
- Messages
- 1
Hi All, I'm trying to create a button which prints multiple external documents (some word and some pdf) using a Macro in Excel. I've begun a Macro, but I don't know enough to see what I've done wrong...
Please explain what I need to Print these external documents, even one at a time. Here's what I attempted:
Sub PrintTitleWd()
'
' PrintTitleWd Macro
'
Dim MyWd As Word.Application
Set MyWd = CreateObject(Word.Application)
With MyWd
.Visible = True
Application.PrintOut Filename:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End With
MsgBox "Quit this Application"
MyWd.Quit
Set MyWd = Nothing
End Sub
Please explain what I need to Print these external documents, even one at a time. Here's what I attempted:
Sub PrintTitleWd()
'
' PrintTitleWd Macro
'
Dim MyWd As Word.Application
Set MyWd = CreateObject(Word.Application)
With MyWd
.Visible = True
Application.PrintOut Filename:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End With
MsgBox "Quit this Application"
MyWd.Quit
Set MyWd = Nothing
End Sub