Solved

I need a vbscript that opens the print dialog box.

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
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.
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 +…

785 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