+ 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
    4

    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
    397

    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
    4

    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)

Similar Threads

  1. Strange NPV Results
    By windpowerfinance in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2017, 05:05 AM
  2. Replies: 8
    Last Post: 06-07-2016, 11:28 AM
  3. strange results when using formula
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2016, 06:53 AM
  4. COS not working and strange results
    By fesan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-23-2015, 02:50 AM
  5. [SOLVED] Strange vlookup results
    By Mary-Lou in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-01-2006, 10:50 PM
  6. [SOLVED] Strange results...
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2006, 05:30 PM
  7. Strange IF results
    By MWE in forum Excel General
    Replies: 0
    Last Post: 03-25-2005, 08:14 PM

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