Share via

PowerPoint VBA, printing to PDF

Anonymous
2018-03-05T06:52:41+00:00

Hello,

Just curious if anyone knows how to print \ publish to PDF file using PowerPoint.

I am using ActivePresentation.ExportAsFixedFormat and have put this before the "export" statement but nothing I have found or tried worked.

    Application.ActivePresentation.PageSetup.SlideOrientation = msoOrientationHorizontal  'sets all slides to Landscape

Curious if it might be a an Adobe Reader setting?  I know I have to change some preferences when selecting contents for a 100 page file to copy and paste into Excel but do not know or have seen anything related to this issue with PowerPoint.

Thank you in advance for any assistance.

Michael

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.8K Reputation points Volunteer Moderator
2018-03-05T09:33:04+00:00

Hmmmm.......Because when I try on my computer everything runs fine...So, code seems to be fine.

I need one help from you. Create a 2 page normal ppt and run this code from there. And see whether this problem is in this newly created ppt also.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2018-03-05T07:32:18+00:00

    Can you run for this and see...

    ActivePresentation.ExportAsFixedFormat _

    Path:=strPathFileName, _

    FixedFormatType:=intOutputType

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-03-05T07:17:31+00:00

    My code is...

        Application.ActivePresentation.PageSetup.SlideOrientation = msoOrientationHorizontal  'sets all slides to Landscape

        ActivePresentation.ExportAsFixedFormat _

            Path:=strPathFileName, _

            FixedFormatType:=intOutputType, _

            Intent:=ppFixedFormatIntentPrint, _

            OutputType:=intSlidesPerPage, _

            PrintHiddenSlides:=intPrintHorizontal, _

            HandoutOrder:=intPrintHorizontal

    The "int" variables are set using check boxes.  It works fine and creates and opens the PDF file.  However, it is always Portrait and I want it to be Landscape when printed...especially if I put 4 or more slides on page.  I have other parameters but they are not the issue.

    I just need to know to change it so when the PDF is created it prints Landscape.

    Thanks!

    Michael

    Was this answer helpful?

    0 comments No comments
  3. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2018-03-05T07:04:30+00:00

    Where exactly are you facing the problem? Can you put your code here and let me know which statement you are facing the problem?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-03-05T06:54:01+00:00

    Sorry, click, click oops!

    I am trying to make the pages in the PDF file print Landscape, not Portrait!

    Thanks again!

    Michael

    Was this answer helpful?

    0 comments No comments