VB script for printing on windows 10

Anonymous
2021-02-14T16:38:30.953+00:00

Hi,

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 for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2021-02-15T17:57:38.863+00:00
    0 comments No comments

  2. Anonymous
    2021-02-16T09:36:57.767+00:00

    Hi,
    Please refer to these helpful discussion here:
    https://stackoverflow.com/questions/50920097/printing-pdf-files-using-vbs

    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

  3. Castorix31 90,521 Reputation points
    2021-03-02T12:19:55.393+00:00

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.