dbTalk Databases Forums  

EMail RTF memo field

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


Discuss EMail RTF memo field in the comp.databases.ms-access forum.



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

Default EMail RTF memo field - 07-29-2010 , 06:01 PM






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

Reply With Quote
  #2  
Old   
Arvin Meyer
 
Posts: n/a

Default Re: EMail RTF memo field - 07-31-2010 , 12:59 PM






Try this:

.BodyFormat = olFormatHTML
.Body = ""
.HTMLBody = Forms!EMailText!EMailText


--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
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

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

Default Re: EMail RTF memo field - 08-01-2010 , 03:56 PM



On 31/07/2010 18:59:45, "Arvin Meyer" wrote:
Quote:
Try this:

.BodyFormat = olFormatHTML
.Body = ""
.HTMLBody = Forms!EMailText!EMailText


Thanks for coming back, Arvin

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.
Non the less - progress.

Phil

Reply With Quote
  #4  
Old   
Douglas J. Steele
 
Posts: n/a

Default Re: EMail RTF memo field - 08-01-2010 , 07:15 PM



"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
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.
Yes, the so-called RTF field in Access 2010 is, in fact, HTML.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/djsteele
Co-author: "Access 2010 Solutions", published by Wiley
(no e-mails, please!)

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

Default Re: EMail RTF memo field - 08-02-2010 , 02:01 AM



On 31/07/2010 18:59:45, "Arvin Meyer" wrote:
Quote:
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>
&nbsp;
</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>
&nbsp;
</div>

That works perfectly. Somehow I need to insert the font instructions into the
HTML string

Phil

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

Default Re: EMail RTF memo field - 08-02-2010 , 03:23 AM



On 02/08/2010 08:01:58, "Phil" wrote:
Quote:
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
&nbsp;
/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
&nbsp;
/div

That works perfectly. Somehow I need to insert the font instructions into
the HTML string

Phil
Came up with an unelegant solution.
Change the standard font to Wingdings so that the user has to select a
readable font once they start typing.

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.