+ Reply to Thread
Results 1 to 3 of 3

Generate PDF file on two sites

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Generate PDF file on two sites

    Please Login or Register  to view this content.
    Is it possible to specify that the output on PDF gets separated on to two pages? I am exporting a worksheet to a PDF but because there are so many columns the font size is very small. If I could split the output to two pages that would be fantastic.

    In advance many thanks for your help!

    I got it so far that it splits the sheet into three pages (with FitToPages) but now I would like that it ignores the entire first row of the sheet when generating the PDF.

    Please Login or Register  to view this content.
    Above I specified that it exports the range B2:U100 to the PDF. In that way it would ignore the first row (=A). The problem is, that the "Result" sheet has not always the same amount of data and therefore at times it also copies blank cells to the PDF. Is it possible to specify above code so that it ignores the first row (=A) and ONLY copies those rows to the PDF that are filled?
    Last edited by JBeaucaire; 03-03-2016 at 01:18 PM.

  2. #2
    Registered User
    Join Date
    02-12-2016
    Location
    Zurich, Switzerland
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Generate PDF file on two sites

    Anyone with an idea how to tackle this?

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Generate PDF file on two sites

    Is it possible to specify above code so that it ignores the first row (=A) and ONLY copies those rows to the PDF that are filled?
    Yes but it depends a bit on where your blank rows are found. If the range to the last row for U varies but every row from B2 to the last U row say U75 are all non blanks a bit of code like this would find the last row in U column with a value and then you could set the propper range:

    Please Login or Register  to view this content.
    But it you have blank rows in between B2 and U100 then I would recomend using and autofilter to get rid of the blank rows and use the filtered range (only visible cells) as the range to convert to pdf.

    By the way have you tried to make your pdf file after removing these lines from you macro?

    Please Login or Register  to view this content.
    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I generate a Word file using an Excel file?
    By public in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-07-2015, 05:46 AM
  2. [SOLVED] Generate csv file from excel
    By anilbavaraju in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2014, 12:27 AM
  3. [SOLVED] Need VBA Help on MS-Access to generate report & save to xlsb file to tageted file
    By breadwinner in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2014, 07:52 AM
  4. Dynamically Generate graph in an excel file from a .csv file [URGENT]
    By pushkarjajoria in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2013, 06:51 AM
  5. Open the last modified file from sharepoint sites
    By vigneshwaran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2012, 12:25 AM
  6. Macro to get the latest file (excel file) from sharepoint sites
    By vigneshwaran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2012, 09:45 AM
  7. Generate File Name Programatically
    By T.J. Lanza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2009, 02:11 PM

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