1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel 2007 need to print odd/even pages

Discussion in 'Business Applications' started by dave.23, Apr 24, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. dave.23

    dave.23 Thread Starter

    Joined:
    Jan 8, 2005
    Messages:
    79
    Hi can any one tell me how to print only odd or even pages in excel 2007.
    I've seen people talk about macro's but i don't have a clue so a basic step by step would be much appreciated.

    Thanks

    Dave
     
  2. etaf

    etaf Wayne Moderator

    Joined:
    Oct 2, 2003
    Messages:
    55,895
    just an idea, when you go to print - you can usually select the pages to print (you have a choice of selection or pages on most printers ) - if you type in the pages section 1,3,5,7,9 etc for ODD and 2,4,6,8 etc for even - upto the maximum number of pages you have - it may save some time in macros etc
    It works for other documents - just never tried with excel, BUT if you set up the page in excel first dont see why not - Dont have Excel 2007 and I'm not near my 2003 version right now.
    maybe worth a try
     
  3. dave.23

    dave.23 Thread Starter

    Joined:
    Jan 8, 2005
    Messages:
    79
    I don't have the option to do that i can only input a range from say 1 to 49 but it print every page not just the odd ones see pic

    [​IMG]
     
  4. hi-tech

    hi-tech

    Joined:
    Apr 23, 2010
    Messages:
    22
    Follow this steps:
    1. Open your document and click on the "View" Tab
    2. Click on the "Macro" button in the right top corner.
    3. In the Box that appears next type "Odd_Even_Print" as name and click "Create"; a Visual Basic editor page will open
    4. Copy/Paste the rest of the script given below between "Sub Odd_Even_Print()" and "End Sub" ( don't need to save or anything just close it and save the excel file)
    5. When you need to print repete steps 1 & 2 select the macro and click "Run"
    6. In the box that appears next Type 1 for odd and 2 for even.:)






    Sub Odd_Even_Print()
    Dim Totalpages As Long
    Dim StartPage As Long
    Dim Page As Integer


    StartPage = InputBox("Enter 1 for Odd, 2 for Even")

    Totalpages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
    For Page = StartPage To Totalpages Step 2
    ActiveSheet.PrintOut from:=Page, To:=Page, _
    Copies:=1, Collate:=True
    Next
    End Sub
     
  5. dave.23

    dave.23 Thread Starter

    Joined:
    Jan 8, 2005
    Messages:
    79
    Cheers that's working great.
    Is there any way i can change the printing order?
    if i print the odd pages it prints 1,3,5ect but in order for me to print 2,4,6ect on the other side of the page i'll have to manually change the order of 1,3,5 when they come out of the printer, if you understand what i mean.
     
  6. hi-tech

    hi-tech

    Joined:
    Apr 23, 2010
    Messages:
    22
    That's being Greedy ;) :)

    Add the following script after the earlier script.

    You have to mention the last page number here, ie say you have 50 pages then, you'll have to type in 49 for odd and 50 for even.

    Sub Odd_Even_Print_Reverse()
    Dim StartPage As Long
    Dim EndPage As Long
    Dim Page As Integer


    EndPage = InputBox("Enter the last page number")

    StartPage = 1
    For Page = EndPage To StartPage Step -2
    ActiveSheet.PrintOut from:=Page, To:=Page, _
    Copies:=1, Collate:=True
    Next

    End Sub
     
  7. dave.23

    dave.23 Thread Starter

    Joined:
    Jan 8, 2005
    Messages:
    79
    You're the man thanks
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/918930