use vbscript to call the print dialog box

I'm very new to VBScript and need to use it to create a button on the IE Toolbar that invokes the print dialog box. The existing print button in IE just prints directly to the printer with out letting users select quantity, printer, etc. I know how to add a button to the toolbar, but I'm stumbling on the vbscript to open the print dialog box.

And no, the users can't use File/Print -- the entire File menu has been disabled. And I can't add the Print Preview to the Toolbar for other reasons.

So my question is: what's a simple vbscript to open the print dialog box?
Who is Participating?
RobSampsonConnect With a Mentor Commented:
Hi, try this in your VBS file:

' First create an Exec menu item in IE by following this article:

Set objShell = CreateObject("Shell.Application")
Set objIE = objShell.Windows.Item

Set objIE = Nothing
Set objShell = Nothing


Put window.print() in the onclick event of your button.  This will pop up the print dialog box to enable the user to choose which printer, pages, etc.
DMSerleyAuthor Commented:
good idea, but its not quite what I need.

window.print() works if the button is in the html, but mybutton is on the toolbar, so I have to call to an exe, bat or vbs.
DMSerleyAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.