[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1021
  • Last Modified:

Change report output to pdf

Hi,  We recently migrated to Office 2010 from Office 2000.  New access doesn't support .snp files and want to get rid of snp viewers on all of my users - one less thing to support.  I have the following code written to send a snapshot report but am stuck on how to format my code to output a pdf file.  

Specifically, I'm having trouble converting this line:
DoCmd.OutputTo acReport, , "SnapshotFormat(*.snp)", strSNPFilePath

As far as I know, access2010/office2010 allows write to pdf?
Private Sub closeform_Click()
On Error GoTo Err_closeform_Click

If (Status <> "Rejected" And Status <> "Cancelled") Then
    If Listings = True Then
        If QINoticeFlag = False Then
            ''SEND EMAIL to QI for Listing submittal
            Dim strSNPFilePath As String
            Call MakeSureDirectoryPathExists("n:\EDM_attachments\ECN_" & Me.ECNNo & "\")
            strSNPFilePath = "N:\EDM_Attachments\ECN_" & ECNNo & "\ECN" & Me.ECNNo & "Report1.snp"
            DoCmd.OpenReport "ChangeReportQI", acViewPreview
            DoCmd.OutputTo acReport, , "SnapshotFormat(*.snp)", strSNPFilePath
            DoCmd.Close acReport, "ChangeReportQI"

            Dim Outlook
            Set Outlook = CreateObject("Outlook.Application")
            Dim Message 'As Outlook.MailItem
            Set Message = Outlook.CreateItem(olMailItem)
            With Message
            .Subject = "ECN #" & ECNNo & " requires a listing submittal"
            .Body = "Items on ECN NO. " & [ECNNo] & ", Titled: " & [Title] & vbCrLf & _
            ", Descr. of Change: " & [Forms]![frmECNMain]![ChangeDescr] & "; requires a listing submittal for UL,FM,NSF or other.  Contact the VP Engineering for details." & _
            "  A summary of this ECN is available at " & "<A href=" & "file://N:\EDM_Attachments\ECN_" & ECNNo & "\ECN" & ECNNo & "Report1.snp"""

            .Recipients.Add ("bobi")
            End With
            MsgBox "Notice has been sent to the QAM to submit a listing submittal against this ECN.", , "Notice Sent"
            QINoticeFlag = True
        End If

Open in new window

  • 3
1 Solution
from access 2007 help:

You can save as a PDF or XPS file from a 2007 Microsoft Office system program only after you install an add-in. For more information, search for "Enable support for other file formats, such as PDF and XPS" on Office Online
valmaticAuthor Commented:
Oh, so even access 2010 does not natively support PDF write?  That blows, the rest of the office suite does.  
valmaticAuthor Commented:
I think I figured it out.  2010 does natively support PDF.

Here's what I need to change...  

DoCmd.OutputTo acReport, , acFormatPDF, strSNPFilePath
Yeah, 2010 supports PDF out of the box.
2007, to keep Adobe's yap shut and avoid anti-trust problems, required a one-time download
valmaticAuthor Commented:
Wrong info given.  I found answer myself.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now