I am trying the following code snippet from inside Excel VBA to call and print a Word document. I want to print 11 copies of the document when this snippet runs:
Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
If Weekday(Now()) <> vbSaturday And Weekday(Now()) <> vbSunday Then
For Each Item In Array("C:\Users\gstearns\documents\notes.docx")
Set objDoc = objWord.Documents.Open(Item)
objDoc.PrintOut
objDoc.Copies = 11
objDoc.Close
Next
End If
objWord.Quit
My question is: Is the code correct for printing 11 copies (the objDoc.Copies = 11 line in the code) or do I need to write it differently to get 11 copies of the document?
Thanks!
Glenn
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.