Skip to Content
author's profile photo Former Member
Former Member

Printing Selected Tabs using Book Publication

Hello,

I currently have a book publication that references a workbook that contains 3 tabs (sheet 1, sheet 2, and sheet 3).

I only want to print sheet 2 on quarter end months (which are Apr, Jul, Oct, and Jan for us), on other months I would like to exclude these from the pdf.

I am hoping to avoid manually deleting the page after the pdf is created. I am also hoping to avoid maintaining to versions of the report and book publication.

I have tried using VBA code to hide the tab, this works well when printing directly from excel. However, it appears that the VBA code is not run during the book publication process.

Has anyone else run into an issue similar to this?

Thanks,

Luke

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2010 at 04:55 PM

    I think you are correct that the VB will not activate during the publication process. My advice is to store the 2 sets of reports and publication scripts for the periods you discussed. It won't be that much more overhead, and separate the process nicely. PLus you won't need to manage any code in VB going forward for the reporting process.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Luke - One way to do this is to make a copy of the report you're using (Save As...) and in the copy, hide all the sheets you don't want to display (hide them manually doing..Format..Sheets...Hide - not with macros ) Set up the BookPub file to reference the copy with the sheets hidden. That's the only way I have been able to print only specific sheets.

      I'd also love to hear from anyone who has a better way to do this.

      Greg

      Edited by: Greg Anderson on Jun 29, 2010 2:10 PM

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:00 PM

    Thank you for the responses.

    We determined it was possible to create a dynamic print range within a single tab, that uses (time, profit center, etc) and control what sections of the reports are printed.

    If anyone is interested in further details, feel free to drop me a message at ltourdot @ brownshoe.com

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.