Access 2007 to Outlook 2007 Attachment

B

bobdydd

Hi Guys

I am currently using the following code in MS Access 2007 to send
emails with
attachments via MS Outlook using the following code. And it works OK

'Prepare Mail
With MyMail
.To = EmailTo
.Subject = Subject
.Body = Body
.Attachments.Add "D:\YCBM\REPORTS
\rptTransactionInvoice.rtf"
.Send
End With

However I would like to go a step further and send an html formatted
email
via MS Outlook 2007

It is posiible to prepare your html email in Dreamweaver and save as a
txt or
html file.

Then. in MS Outlook 2007 it is possible when adding a file as an
attachment
to add to specify "add as text" and the text goes to the source code
and
renders beautifully as an html email

So my question: Is it possible to change this line that would add the
attachment as text
.Attachments.Add "D:\YCBM\REPORTS\rptTransactionInvoice.rtf"

Thanks in advance
 
P

Phil

Hi Guys

I am currently using the following code in MS Access 2007 to send
emails with
attachments via MS Outlook using the following code. And it works OK

'Prepare Mail
With MyMail
.To = EmailTo
.Subject = Subject
.Body = Body
.Attachments.Add "D:\YCBM\REPORTS
\rptTransactionInvoice.rtf"
.Send
End With

However I would like to go a step further and send an html formatted
email
via MS Outlook 2007

It is posiible to prepare your html email in Dreamweaver and save as a
txt or
html file.

Then. in MS Outlook 2007 it is possible when adding a file as an
attachment
to add to specify "add as text" and the text goes to the source code
and
renders beautifully as an html email

So my question: Is it possible to change this line that would add the
attachment as text
.Attachments.Add "D:\YCBM\REPORTS\rptTransactionInvoice.rtf"

Thanks in advance

This works for me (Office 2010, but I recon no different to 2007)

Function SendEMailAndFiles(MailTo As String, Subject As String, BodyText As
String, IsRtf As Boolean, _ MsgRead As Boolean, Attach() As String, RTFText
As String) As Integer .
Lots of stuff here, but not relevant to you I think
 
A

a a r o n . k e m p f

I just use SQL Server Reporting Services to do this natively without
writing any code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top