John-
Thanks a lot. What I Meant is by clicking on a command button within access form to send email in html format, the data comes from access, and they are might be tables or text contents. Is that possible?
Regards,
Kevin
发自我的小米手机
在 "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015年9月6日 下午3:39写道:
Kevin-
Yes, you can do it using Outlook automation. Set a reference to the Outlook library in VBA, then use code like this:Sub CreateHTMLMail()'Creates a new e-mail item and modifies its properties.Dim olApp As Outlook.ApplicationDim objMail As Outlook.MailItemSet olApp = Outlook.Application'Create e-mail itemSet objMail = olApp.CreateItem(olMailItem)With objMail' Set recipient.To = "Kevin@someMail.com"' Set subject.Subject = "A message in HTML format…"'Set body format to HTML.BodyFormat = olFormatHTML.HTMLBody = "<HTML><BODY>Enter the message text here. </BODY></HTML>".SendEnd WithEnd SubJohn Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Sep 6, 2015, at 3:07 AM, zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:Dear All,
I have learnt how to send html as attachment by the code below.
DoCmd.SendObject acSendReport,"rptReport", acFormatHTML,To:= Email here, Subject:=, Message:=False
My question is, is that possible to send html in email content, instead of as attachment?Many thanks,Kevin
__._,_.___
Posted by: zhaoliqingoffice <zhaoliqingoffice@163.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar