On 01/02/2011 19:17:28, bobdydd wrote:
> 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
|