MS Access: how to export to pdf in landscape orientation?
13,185
Solution 1
You could print it out using Cute PDF and set the print output to Landscape
Solution 2
Actually there is another way - with the view you want open switch to the file menu and choose print > print preview then select the option you want eg landscape save this and the pdf export will remember it.
This also works for Print to PDF, whereas Save & Publish only creates in Portrait.
Solution 3
When this code runs, all you see is the file save dialog. Cute PDF must be installed according to instructions on website.
Dim stDocName as string
Dim prn As Printer
Dim rpt As Report
stDocName = "your report object name"
Set prn = Application.Printers("CutePDF Writer")
prn.Orientation = acPRORLandscape
DoCmd.OpenReport stDocName, acViewPreview, , , acHidden
Set rpt = Reports(stDocName)
Set rpt.Printer = prn
DoCmd.PrintOut
DoCmd.Close acReport, stDocName
Related videos on Youtube
Author by
yurib
Updated on September 17, 2022Comments
-
yurib almost 2 years
I have a Pivot Chart in MS-Access which i want to export as a PDF file. How can i set the resulting PDF's orientation from portrait to landscape ?
-
yurib over 13 yearsI'm sure there's more than one workaround but I was hoping there's a simple setting in Access that controls this property.
-
ta.speot.is over 13 yearsSet the printer and report page orientation to landscape and then export it to PDF...
-
David W. Fenton over 13 yearsWhile printer control in Access is easier than it once was (since Access 2002), it's still not trivial, and it's kind of unpredictable. I would suggest for reliability you set up an actual report for the pivot chart, rather than try to print a form.