+ Reply to Thread
Results 1 to 3 of 3

Export worksheets to pdf in vba gives strange results

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    2

    Export worksheets to pdf in vba gives strange results

    I have a weird situation. I want to create a pdf document from a worksheet.
    If I do this manually the pdf looks perfect. The steps are: select the worksheets, goto File -> Export -> Create PDF/XPS.
    If I then use the macro recorder and repeat the exact same steps I get this code:

    Please Login or Register  to view this content.
    If I run this code the pdf shows only half the page. I don't know if it is relevant but the worksheet contains linked pictures.
    It seems really strange because I believe I'm doing the exact same thing with different results...

    Does anyone have a clue why this happens and what I can do to fix this?

    Thanks!
    Johan.

  2. #2
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    376

    Re: Export worksheets to pdf in vba gives strange results

    Perhaps you should change your printer settings and your page size settings?

  3. #3
    Registered User
    Join Date
    12-10-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Export worksheets to pdf in vba gives strange results

    I don't think it has anything to do with printer or page size settings. The page size is correct, it just does not show the full content of the worksheet when the pdf created via vba. When created manually (following exactly the same steps) it does show the full page as expected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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