Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008

    Unanswered: ConvertReportToPDF


    I'm using Windows 7 and Access 2010, although the database was created in Access 2003 originally.

    I've been successfully using Stephen Lebans' ConvertReportToPDF code for a landscape report. That is, until we upgraded our computers to this new configuration. Now, the reports are all created in portrait orientation.

    I read other threads in many other forums that suggested things to test, but never actually gave the root problem/resolution.

    Here's what I've found. I can run the report in Access and it comes out landscape (no surprise.) I can save this report as a snapshot, but it comes out in portrait. Obviously this is the problem but I don't see any settings in snapshot viewer to correct it.

    I'm sure the ConvertReportToPDF will work if I can fix this. Any help would be appreciated.

  2. #2
    Join Date
    Jun 2008
    Never mind. Since I'm in Access 2010 I can use the following code instead of using the ConvertReportToPDF function:

    Dim stDocName As String
    Dim strPath As String

    stDocName = "Report1"

    strPath = "s:\\shared\Reports\" & stDocName & ".pdf"

    DoCmd.OutputTo acOutputReport, stDocName, acFormatPdf, strPath

Posting Permissions

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