Solved

I need a vbscript that opens the print dialog box.

Posted on 2007-11-15
1
794 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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 +…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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