Link to home
Start Free TrialLog in
Avatar of valmatic
valmaticFlag for United States of America

asked on

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?
thanks
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")
                
            .Send
            End With
            MsgBox "Notice has been sent to the QAM to submit a listing submittal against this ECN.", , "Notice Sent"
            QINoticeFlag = True
        End If
    Else:

Open in new window

Avatar of dqmq
dqmq
Flag of United States of America image

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
Avatar of valmatic

ASKER

Oh, so even access 2010 does not natively support PDF write?  That blows, the rest of the office suite does.  
ASKER CERTIFIED SOLUTION
Avatar of valmatic
valmatic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nick67
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
Wrong info given.  I found answer myself.