[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Microsoft Access 2013 Output to PDF loosing Landscape

Posted on 2015-01-29
7
Medium Priority
?
1,788 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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 …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 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