[AccessD] Automating pdf printer

Rocky Smolin rockysmolin at bchacc.com
Wed Nov 17 16:02:51 CST 2010


I found a module called ConvertRerportToPDF - but can't remember where I got
it but I think its Lebans' - http://www.lebans.com/reporttopdf.htm .  Works
well, though - minimal code.  This one prints a purchase order to a pdf and
then attaches it to an email and sends it out.

    Do While Right(strFrontEndPath, 1) <> "\"
        strFrontEndPath = Left(strFrontEndPath, Len(strFrontEndPath) - 1)
    Loop
    
    strPOPDFName = strFrontEndPath & "Purchase Order " _
        & Me.fldPOPrefix & Me.fldPONumber & ".pdf"
    strPOPDFName = Replace(strPOPDFName, "*", "")
    
    Call ConvertReportToPDF("rptPurchaseOrder-Beilis", , strPOPDFName, ,
False)
    
    Dim myolApp As Outlook.Application
    Dim myItem As Outlook.MailItem
    Dim strDataFileName As String
    
    Set myolApp = CreateObject("Outlook.Application")
    Set myItem = myolApp.CreateItem(olMailItem)
    myItem.To = strEmail
    myItem.Subject = "Purchase Order " _
        & Me.fldPOPrefix & Me.fldPONumber
    'myItem.Attachments.Add strDataFileName
    myItem.Attachments.Add strPOPDFName
    'myItem.Send
    myItem.Display
       
End If 

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, November 17, 2010 12:18 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Automating pdf printer

A client wants to print stuff to a pdf and send the email.  I would create a
report and send it to the printer, then pick up the resulting file and send
an email.

I know how to do everything except the pdf part in the middle.

Is anyone doing this?
--
John W. Colby
www.ColbyConsulting.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list