Results 1 to 5 of 5

Set Printer name and Setting in Macro

Threaded View

  1. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Set Printer name and Setting in Macro

    Great,

    Based on what you wrote, I made this:

    
    
    Option Explicit
    Sub SelectPrinter()
        Dim sNewPrinter As String
    
        sNewPrinter = ActivePrinter
        ActivePrinter = "XXXXXWestOffice on XXX-XX-001.office.XXXXXsmfg.com"
        Sub MacroPint3()
        On Error Resume Next
        
        Call Prt_001
        Call Prt_002
        Call Prt_003
        Call Prt_004
        Call Prt_005
        Call Prt_006
        Call Prt_007
        Call Prt_008
        Call Prt_009
    End Sub
    
    Sub Prt_001()
      With Worksheets("Pnch, Asy, Oth, Mach SchedRsc").PivotTables("PivotTable2")
            .PivotFields("SchedGroup").ClearAllFilters
            .PivotFields("SchedGroup").CurrentPage = "Assembly"
            .PivotFields("Rsc").ClearAllFilters
            .PivotFields("Rsc").CurrentPage = "(All)"
             Application.PrintOut Filename:=""                             '<--- NEW
            .Parent.PrintOut Options.PrintDraft = False                    '<--- NEW
      End With
    End Sub
    
    Sub Prt_002()
      With Worksheets("Brk SchedPrimeRq").PivotTables("PivotTable1").PivotFields("SchedGroup")
        .ClearAllFilters
        .CurrentPage = "Brake"
        Application.PrintOut Filename:=""                              '<--- NEW
        .Parent.Parent.PrintOut Options.PrintDraft = False             '<--- NEW
      End With
    End Sub
    
    Sub Prt_003()
      Dim vs            As Variant
      With Worksheets("Asy,Lsr,HW,WD,SW,PC SchedRqList").PivotTables("PivotTable2").PivotFields("SchedGroup")
        For Each vs In Array("Powder", "SpotWeld", "Weld", "Hardware", "LASER")
          .ClearAllFilters
          .CurrentPage = vs
        Application.PrintOut Filename:=""                              '<--- NEW
          .Parent.Parent.PrintOut From:=1, To:=3, Copies:=1
          Options.PrintDraft = False                                    '<--- NEW
        Next vs
      End With
    End Sub
    How would I specify in printer Setting Job Type: Normal Print

    Thanks,
    Yuriy
    Last edited by YuriyBaron; 10-16-2017 at 04:09 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Setting a default Printer for a macro then resetting it back to its original value
    By ashvinsolanki in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-03-2014, 12:08 PM
  2. Setting the default printer
    By martinpgibson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-19-2013, 05:43 PM
  3. Printing Macro Problem - Setting Default printer
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2012, 03:37 AM
  4. macro to print 2 copies to default printer, then 1 copy to Adobe PDF printer
    By jwright650 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 01:07 PM
  5. setting PDF Creator as a default printer thro VBA macro
    By mvel_sky in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2010, 01:43 AM
  6. [SOLVED] Setting EDoc Printer Pro in macro
    By Frank in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2006, 10:55 AM
  7. [SOLVED] Setting printer in VB
    By bscarano@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2005, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1