Consulting

Results 1 to 11 of 11

Thread: excel to pdf print

  1. #1
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location

    excel to pdf print

    Hello,

    I like to have landscape orientation pdf (when select "file", and "print "). In Excel is ok. When I run macro, pdf is ok (landscape)
    But when I select print, orientatiov is Portland, not landscape

    IncludeDocPropertis:=True doesnt work.

    It possible to force landcape orientation to print setup?

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    606
    Location
    .
    ActiveSheet.PageSetup.Orientation = xlLandscape

  3. #3
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location
    not working. When selected in pf file, print, pagesetup, orienatation in Portland. Beacuse my page is landscap, must be printed landscape (pdf print).

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    I usually do it like this

    Sub Example1()
        ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Me\Documents\test3.pdf", _
            Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
            OpenAfterPublish:=False
    End Sub
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #5
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location
    Yes, code is the same. PDF (when I open with maro) is ok, orientation landscape. If I liked too print it, must manual select landscape orientation.
    I try some codes from internet, but nothing Works

  6. #6

  7. #7
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location
    not working.

    PDf is landscape orientatio. but when I select icon "printer", is Portland orientation. I can not force lanscape orientation

  8. #8
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    1. Can your printer print landscape?

    2. What program are you using to print?

    3. Adobe Reader does it just fine

    Capture.JPG
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  9. #9
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location

    Post

    1.yes, I can print landscape
    2. I open pdf with pdf adobe acrobat
    3. in excel, is landscape orientation, when I convert to pdf, pdf is landscape orientation.
    But when click print, is marked Portland (print window is the sama as yours).
    I dont know why
    Last edited by Borut; 11-25-2020 at 03:46 AM.

  10. #10
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    606
    Location
    .
    Here's a stab in the dark ... update your printer drivers.

  11. #11
    VBAX Regular
    Joined
    Oct 2020
    Posts
    24
    Location
    I remove page breaks and add rows, that the page is full (excel separate pages). only this help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •