Solved

I need a vbscript that opens the print dialog box.

Posted on 2007-11-15
1
789 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

860 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