+ Post New Thread
Results 1 to 7 of 7
Scripts Thread, Are you sure you want to print? in Coding and Web Development; Has anyone come across a small script or program that basically asks "Are you sure you want to print?" before ...
  1. #1

    Join Date
    May 2013
    Posts
    29
    Thank Post
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Are you sure you want to print?

    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 :-)

  2. #2

    Join Date
    May 2013
    Posts
    29
    Thank Post
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Anyone?

  3. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,665
    Thank Post
    1,614
    Thanked 1,866 Times in 1,384 Posts
    Blog Entries
    2
    Rep Power
    400
    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.

  4. #4
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,102
    Thank Post
    46
    Thanked 132 Times in 114 Posts
    Rep Power
    43
    Ohh.. +1.

  5. #5
    Zourous's Avatar
    Join Date
    Mar 2007
    Location
    East Sussex
    Posts
    324
    Thank Post
    92
    Thanked 80 Times in 35 Posts
    Rep Power
    46
    Change the print button to say "Press this only if you'll really really sure you want to print"

  6. #6

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,665
    Thank Post
    1,614
    Thanked 1,866 Times in 1,384 Posts
    Blog Entries
    2
    Rep Power
    400
    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).

  7. #7

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,665
    Thank Post
    1,614
    Thanked 1,866 Times in 1,384 Posts
    Blog Entries
    2
    Rep Power
    400
    ok, this will get people to click ok or cancel to the print, and then, ask how many copies they want.

    Code:
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Are you sure you want to open this file?
    By Alkaline in forum Windows 7
    Replies: 7
    Last Post: 17th July 2013, 01:22 PM
  2. [Pics] This is what happens when you ask people not to print large jobs
    By Arthur in forum Jokes/Interweb Things
    Replies: 3
    Last Post: 1st August 2012, 01:27 PM
  3. Smart Notebook 9.5 (I think) - always wants to print 14 copies!
    By Jon_Thornton in forum Educational Software
    Replies: 0
    Last Post: 5th October 2011, 04:49 PM
  4. Replies: 6
    Last Post: 9th May 2011, 02:43 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •