Try:
Const oMailItem As Long = 0
Dim oOutlook As Object
Dim omail As Object
Set oOutlook = CreateObject("Outlook.Application")
Set omail = oOutlook.CreateItem(olMailItem)
omail.Subject = "Email with attachment"
omail.Attachments.Add strFileName, 1
omail.Display
Set omail = Nothing
oOutlook.Quit
Set oOutlook = Nothing
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Dale Fye" <(E-Mail Removed)> wrote in message
news:6A2BECC9-7776-472B-B8EB-(E-Mail Removed)...
>
> I have users using one of my applications that are running Office 2003 and
> 2007. To avoid reference problems, I was hoping to use late binding to
> automate sending a message with attachments from within Access. The code
> I'm
> currently using (below) requires the appropriate reference. Can anyone
> provide recommendations for modifications to this to allow late binding?
>
> Dim omail As Outlook.MailItem
> Set omail = CreateItem(olMailItem)
> omail.Subject = "Email with attachment"
> omail.Attachments.Add strFileName, 1
> omail.Display
> Set omail = Nothing
>
> --
> Dale
>
> email address is invalid
> Please reply to newsgroup only.
>