![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Access 2010 having got this super RTF memofild, how do I Email it as the body. The formated text is in a bound form EMailText and a bound field name is also EMailText Code is .... Get outlook running Set oItem = oOutlookApp.CreateItem(OLMailItem) With oItem 'Set the recipient for the new email .BCC = MailToStg 'Set the recipient for a copy .cc = "" 'Set the subject .Subject = Subject 'The content of the document is used as the body for the email .Body = "" '.HTMLBody = Forms!EMailText!EMailText ' Tried this .RTFBody = Forms!EMailText!EMailText ' Tried this .Send End With EMailMessage = True If FlgQuit = True Then oOutlookApp.Application.Quit End If CleanUp: Set oItem = Nothing Set oOutlookApp = Nothing Exit Function Err_EMailMessage: If Err = 287 Then ' No to send email MsgBox "Email not sent", vbInformation Else MsgBox Err.Description End If GoTo CleanUp End Function Have also tried DoCmd.SendObject t acSendNoObject, , "html", , , "Phil (AT) Stantonfamily (DOT) co,uk", "Test", Forms!EMailText!EMailText |
#3
| |||
| |||
|
|
Try this: .BodyFormat = olFormatHTML .Body = "" .HTMLBody = Forms!EMailText!EMailText |
#4
| |||
| |||
|
|
On 31/07/2010 18:59:45, "Arvin Meyer" wrote: Try this: .BodyFormat = olFormatHTML .Body = "" .HTMLBody = Forms!EMailText!EMailText The email got through OK but the message appeared as plain text rather than formatted text. Not sure whether the formated memo field is RTF or HTML. I know that on the EMailText field in the table, the format is set to RTF, but I believe I read that it is actually HTML. |
#5
| |||
| |||
|
|
Try this: .BodyFormat = olFormatHTML .Body = "" .HTMLBody = Forms!EMailText!EMailText |
#6
| |||
| |||
|
|
On 31/07/2010 18:59:45, "Arvin Meyer" wrote: Try this: .BodyFormat = olFormatHTML .Body = "" .HTMLBody = Forms!EMailText!EMailText Hi Arvin Have re-checked and it works nearly perfectly. I suspect there is a sort of bug in the memo field. My message is "This is a Rich Text Message in Access 2010" The "This is a Rich Text" is supposed to be in Tahoma 8 (the standard font of the EMailText Field), "Message" in Showcard Gothic 24 and "in Access 2010" in red Seago Stript 14 In debug mode, ?Forms!EMailText!EMailText div This is a Rich Text font face="Showcard Gothic" size=6>message </font font face="Segoe Script" size=4 color="#ED1C24">in Access 2010</font /div div /div So the initial 5 words does not get the format instruction. Consequently those 5 words in the email come out as Times New Roman 12 in the EMail. If I change the format of tose 5 words to Curlx MT then I get ?Forms!EMailText!EMailText div font face="Curlz MT">This is a Rich Text </font font face="Showcard Gothic" size=6>message </font font face="Segoe Script" size=4 color="#ED1C24">in Access 2010</font /div div /div That works perfectly. Somehow I need to insert the font instructions into the HTML string Phil |
![]() |
| Thread Tools | |
| Display Modes | |
| |