PC Review


Reply
Thread Tools Rate Thread

Access 2007 to Outlook 2007 Attachment

 
 
bobdydd
Guest
Posts: n/a
 
      1st Feb 2011
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
 
 
 
 
Phil
Guest
Posts: n/a
 
      1st Feb 2011
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
 
Reply With Quote
 
a a r o n . k e m p f @gmail.com [MCITP: DBA]
Guest
Posts: n/a
 
      2nd Feb 2011
I just use SQL Server Reporting Services to do this natively without
writing any code


On Feb 1, 11:17*am, bobdydd <reallyuseful2...@yahoo.co.uk> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 7 64bit, Outlook 2007 and Word 2007 Email attachment issue Service Guy Microsoft Outlook Discussion 0 16th Feb 2010 02:56 PM
importing table contents from Word 2007 into Access 2007 andgenerating queries, reports using Access 2007 g_1 Microsoft Word Document Management 3 12th Nov 2009 06:58 AM
How do I email out of Word 2007 and not as Outlook 2007 attachment =?Utf-8?B?V0dX?= Microsoft Word Document Management 3 18th Aug 2009 04:22 PM
Problem with Excel 2007 attachment in Outlook 2007 Sergey Microsoft Outlook Discussion 3 28th Jun 2008 12:26 PM
Where do excel 2007 attachment saved when open in outlook 2007? ben Microsoft Outlook Discussion 2 26th Jun 2008 04:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:54 PM.