This code works to print a Word docx from Excel when I hard code a path for the docx file:
Sub PrintDocs()
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("c:\test.docx")
objWord.Visible = True
objDoc.PrintOut
objWord.Quit
End Sub
However, I need help to print a docx file in the same folder as the Excel file.
Your feedback is appreciated.
Sub PrintDocs()
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("c:\test.docx")
objWord.Visible = True
objDoc.PrintOut
objWord.Quit
End Sub
However, I need help to print a docx file in the same folder as the Excel file.
Your feedback is appreciated.