I want to create a Access 2007 form / report which will send a HTML mail. There will be a "button". When someone click on that button then an Outlook 2007's "New Email" window will be opened with a "report" in its body (not in attachment).

How can I do that?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

You'll have to set up some VBA code to do the work, but it can be done.

Here's a basic example to get you started, it creates a new instance of Outlook, creates a new email item, fills it with the info provided in the variables and then opens it (in Outlook) for the user to see, edit and/or send:

Set ola1 = New Outlook.Application

Set mai1 = ola1.CreateItem(olMailItem)
mai1.To = strTo
mai1.Subject = strSubj
If bolHTML = True Then
    mai1.HTMLBody = strBody
Else
    mai1.Body = strBody
End If
mai1.Display 

More info here (amongst many other places).

link|improve this answer
1  
Thank you very much... – chanchal1987 Jun 15 '11 at 17:55
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.