VB script for printing on windows 10



I wanted to print a file using VB script. Static file will be stored in disk so i need to print that static file using vb script.

Does anyone has an idea how to print the pdf file using vb script stored in some folder in disk?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
9,507 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Dale Kudusi 3,246 Reputation points

    Please refer to these helpful discussion here:

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information

    Best regards.

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Castorix31 79,916 Reputation points

    Or this minimal test script works for me with a .pdf file passed as argument :

    Set objShell = CreateObject("Shell.Application")
    strFile = WScript.Arguments.Item(0)
    objShell.ShellExecute strFile, "", "", "print", 0
    0 comments No comments