Sue,
Thanks for the help. This is what I am doing in integration
with the PDF Mail Pro library from ACG Soft...
' ***********************
Sub SendPDF(rptName As String, rptLoanNum As String,
rptEmail As String, rptSubject As String)
On Error GoTo SendPDF_Error
' Code from the PDF class included in
' PDF Pro Mail Library 10.mde
Dim objPDF As New PDFClass
Dim lngResult As Long
With objPDF
.ReportName = rptName
.ReportWhere = "[LoanNumber] = '" & rptLoanNum & "'"
.OutputFile = "d:\REOSell\" & rptName & ".pdf"
.PDFEngine = 5 'Choose your driver
.PrintImage
lngResult = .Result
End With
DoEvents
' Do Until objPDF.Result = True
' Wail until done
' Loop
Set objPDF = Nothing
' Outlook sending code
Dim i As Integer
Dim Email As String
Dim EBody As String
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
EBody = "Please see the following email
attachment from REO World."
'Send email
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(rptEmail)
objOutlookRecip.Type = olTo
.Subject = rptSubject
.Body = EBody
Set objOutlookAttach =
..Attachments.Add("d:\REOSell\" & rptName & ".pdf")
objOutlookMsg.Send
Set objOutlookMsg = Nothing
End With
Set objOutlook = Nothing
'MsgBox "Done."
End Sub
' *****************
--
Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
Maybe. It depends on what the rest of your code looks
like -- as in how you're creating the message.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at
http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers