dbTalk Databases Forums  

Access 2007 to Outlook 2007 Attachment

comp.databases.ms-access comp.databases.ms-access


Discuss Access 2007 to Outlook 2007 Attachment in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bobdydd
 
Posts: n/a

Default Access 2007 to Outlook 2007 Attachment - 02-01-2011 , 01:17 PM






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

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Access 2007 to Outlook 2007 Attachment - 02-01-2011 , 04:52 PM






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

Reply With Quote
  #3  
Old   
a a r o n . k e m p f @gmail.com [MCITP: DBA]
 
Posts: n/a

Default Re: Access 2007 to Outlook 2007 Attachment - 02-02-2011 , 09:52 AM



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


On Feb 1, 11:17*am, bobdydd <reallyuseful2... (AT) yahoo (DOT) co.uk> wrote:
Quote:
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.