?
Solved

Microsoft Access 2013 Output to PDF loosing Landscape

Posted on 2015-01-29
7
Medium Priority
?
1,697 Views
Last Modified: 2016-02-10
I use the following code to export my report to pdf
DoCmd.OpenReport "TotalbyUserOrganization", acViewReport, "", "", acNormal
DoCmd.OutputTo acOutputReport, "TotalbyUserOrganization", "PDFFormat(*.pdf)", myfilename, True, "", , acExportQualityScreen
DoCmd.OpenReport "TotalbyUserOrganization", acViewPreview, "", "", acHidden

Open in new window

This works fine except for all non landscape reports but when I used this code for my report that requires landscape it prints to adobe on portrait. The report view is correct. Do I need VBA code for landscape. I have searched and have not found an answer for this. This is Microsoft Access 2013. Thanks for the help.
0
Comment
Question by:marlind605
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 28

Assisted Solution

by:omgang
omgang earned 1000 total points
ID: 40578349
Thinking it's the acExportQualityScreen parameter.  You're telling it to optimize output for the a screen device.
See https://msdn.microsoft.com/en-us/library/office/ff192065(v=office.15).aspx
OM Gang
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 1000 total points
ID: 40578824
Your code, though I modified it slightly, worked fine as-is and gave me a Landscape PDF for a Landscape Report:

DoCmd.OpenReport "rptYourReport", acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, "rptYourReport", "PDFFormat(*.pdf)", "C:\YourFolder\Test.pdf", True, "", , acExportQualityScreen
DoCmd.Close acReport, "rptYourReport"

BTW, I am using Access 2010, so you (using 2013) might want to make sure you have all you Updates installed for Windows and Office.

JeffCoachman
0
 

Author Comment

by:marlind605
ID: 40579627
Thanks for both of the replies. OM Gang, I tried acExportQualityPrint and I get the same thing. The thing of it is I have 3 reports printing in landscape and I am only having trouble with 1.  jeffCoachman, I tried your solutions saving one of my good reports as a test and I get an output cancelled error. Any other thoughts for this problem?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Accepted Solution

by:
marlind605 earned 0 total points
ID: 40579992
I did some more searching and found the solution. I changed the page setup columns width to 10.75 same as on the report and it worked. Not sure why I had to do that. I spent way to much time on it.
0
 

Author Comment

by:marlind605
ID: 40580002
I did some more searching and found the solution. I changed the page setup columns width to 10.75 same as on the report and it worked. Not sure why I had to do that. I spent way to much time on it. Thanks for the assist.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40580518
Oh,
You did not state you had columns setup for his report...

Glad you got it figured out.
;-)

Jeff
0
 

Author Closing Comment

by:marlind605
ID: 40588216
Not sure if I am doing this correct but I did find the solution and I learned something from the other two comments. Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question