I have a word document linked to a worksheet via the 'special paste' option. I want my user to be able to print this word document from a button on the work sheet. The following code:
Sub PrintFromLinkedWordDoc()
Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
Set objDoc = objWord.Documents.Open _
("C:\Users\my name\Documents\Excel Test Spread Sheats\Printing word from exce\Target.docx")
objDoc.PrintOut
objDoc.Close
objWord.Quit
End Sub
results in Run-Time error '5174' "This file cannot be found". I am sure the pathway is correct. I must be missing a setting or something. Any help would be greatly appreciated
thank you, OldFart1
Bookmarks