PDA

View Full Version : Print Documents Using File Path



BrI
11-23-2017, 01:29 PM
I want to print .pdf documents using their file paths, code below is not working. The code runs with no errors, but nothing happens.


Sub PrintDocs()

strFilePath = "C:\Users\....\Example.pdf"

CreateObject("Shell.Application").Namespace(0).ParseName(strFilePath).InvokeVerb ("Print") 'Also tried using ("&Print")

End Sub

Can anyone assist?

Logit
11-23-2017, 07:16 PM
.
Have you tried supplying the entire path for strFilePath ?

Ex:



strFilePath = "C:\Users\YourComputerName\Documents\Example.pdf"