Solved

I need a vbscript that opens the print dialog box.

Posted on 2007-11-15
1
784 Views
Last Modified: 2013-12-08
I need add a button to the IE 6 Toolbar that will open the print dialog box -- as if the user was clicking on File/Print.

The entire File menu has been disabled, and for security reasons users don't have the option of right-clicking  to customize the toolbar and add Print Preview.

I know how to add an icon to the toolbar using the Group Policy. But I can't seem to figure out how to write a simple vbs file that will invoke the print dialog box. The script is what I need help on.
0
Comment
Question by:DMSerley
1 Comment
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 20292187
Hi, try this in your VBS file:

'=======
' First create an Exec menu item in IE by following this article:
'http://msdn2.microsoft.com/en-us/library/aa753591.aspx

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

objIE.Document.ParentWindow.Print
     
Set objIE = Nothing
Set objShell = Nothing
'=======

Regards,

Rob.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now