+ Reply to Thread
Results 1 to 2 of 2

Duplex (double-sided) printing VBA Help Needed

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Riverside
    MS-Off Ver
    Excel 2010
    Posts
    8

    Duplex (double-sided) printing VBA Help Needed

    Currently I am working on writing a VBA code that not only prints one set print area (page 1) in landscape format, but also prints a second (page 2) print area in portrait orientation. So far i've successfully programed it to print in both views, but I am having trouble combining the code, and having it understand to print each print area on either side of paper.. Any suggestions?

    I've tried putting in a simple collelate code in, but yet it seems to have excel print both areas in each format. (i.e. one with both pages in portrait, and another with both in landscape).. Starting to get frustrated!!

    Here is the macro code below, where am I going wrong?

    Macro1 Macro
    '

    '
    If ActiveSheet.Name <> "Workloads & Commitments" Then 'Insert sheet you want to print this way here
    Exit Sub
    Else
    With ActiveSheet.PageSetup
    .LeftMargin = Application.InchesToPoints(0.25)
    .RightMargin = Application.InchesToPoints(0.25)
    .TopMargin = Application.InchesToPoints(0.25)
    .BottomMargin = Application.InchesToPoints(0.25) 'Set all settings as desired
    .HeaderMargin = Application.InchesToPoints(0)
    .FooterMargin = Application.InchesToPoints(0)
    .CenterHorizontally = False
    .CenterVertically = False
    .Orientation = xlPortrait
    End With


    With ActiveSheet.PageSetup
    .LeftMargin = Application.InchesToPoints(0.25)
    .RightMargin = Application.InchesToPoints(0.25)
    .TopMargin = Application.InchesToPoints(0.25)
    .BottomMargin = Application.InchesToPoints(0.25)
    .HeaderMargin = Application.InchesToPoints(0)
    .FooterMargin = Application.InchesToPoints(0)
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    End With
    ActiveSheet.PrintOut Collate:=True


    End If

    End Sub

  2. #2
    Registered User
    Join Date
    02-26-2013
    Location
    Riverside
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Duplex (double-sided) printing VBA Help Needed

    Bump, in hopes i get some help!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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