ChristianDavies Posted February 14, 2014 Posted February 14, 2014 Has anyone come across a small script or program that basically asks "Are you sure you want to print?" before someone prints? I don't want anything like PaperCut or PCounter, I just want something free that displays a pop-up that confirms you want to print before you do so. Any help appreciated :-)
featured_spectre Posted February 19, 2014 Posted February 19, 2014 Just to be sure.. They click the print icon and it asks if they want to print? If you allow macros I will knock one up for word in the morning.
Zourous Posted February 19, 2014 Posted February 19, 2014 Change the print button to say "Press this only if you'll really really sure you want to print"
featured_spectre Posted February 19, 2014 Posted February 19, 2014 With the right macros I can make it so it picks the tray you print from (ie tray 1, 2 or 3) which we define as soft, hard and labels (types of paper in the tray).
featured_spectre Posted February 20, 2014 Posted February 20, 2014 ok, this will get people to click ok or cancel to the print, and then, ask how many copies they want. Sub Print() Dim NoCopies As String Dim DP As String Dim CP As String Dim Response As VbMsgBoxResult Response = MsgBox("Are you sure you want to print" & vbCrLf & _ "Click 'OK' to print. " & vbCrLf & _ "Or click 'Cancel' to stop printing.", _ vbExclamation + vbOKCancel) If Response = vbOK Then Application.Dialogs(xlDialogPrinterSetup).Show Application.ScreenUpdating = False Resume Else Resume AllDone End If End With ) NoCopies = InputBox(Prompt:="How many copies would you like? Please enter a value from 0 - 5", Title:="Copies?") DP = ".." 'Define Clients Default Printer CP = ".." 'Define Clients New Colour Printer ActivePrinter = CP 'Change printer to duplex printer If NoCopies = "0" Or NoCopies = "1" Or NoCopies = "2" Or NoCopies = "3" Or NoCopies = "4" Or NoCopies = "5" Then With ActiveDocument.PageSetup .FirstPageTray = wdPrinterFormSource .OtherPagesTray = wdPrinterFormSource End With Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _ ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _ False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0 With ActiveDocument.PageSetup .FirstPageTray = wdPrinterFormSource .OtherPagesTray = wdPrinterFormSource End With 'Print Copy or Copies If NoCopies = 1 Then Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 ElseIf NoCopies = 2 Then Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=2, Pages:="", PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 ElseIf NoCopies = 3 Then Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=3, Pages:="", PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 ElseIf NoCopies = 4 Then Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=4, Pages:="", PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 ElseIf NoCopies = 5 Then Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=5, Pages:="", PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 ElseIf NoCopies = 0 Then End If With ActiveDocument.PageSetup ' Change tray to AUTO .FirstPageTray = wdPrinterFormSource .OtherPagesTray = wdPrinterFormSource End With Else 'if wrong value is entered MsgBox ("Please Enter a value from 0-5") ActivePrinter = DP NoCopies = "" Exit Sub End If 'Change Printer Back ActivePrinter = DP NoCopies = "" End Sub Fully tested on Office 2003 and 2010.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now