By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,153 Members | 2,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,153 IT Pros & Developers. It's quick & easy.

Rich Text in an e-mail?

P: n/a
ARC
Hello all,

My app has an e-mailing feature where you can e-mail reports, as well as a
bulk e-mail feature for e-mailing all customers (as separate e-mails). I
allow the user to set the subject text, body text, and browse for
attachments.

I also allow 3 basic e-mailing options: Default mail handler (Mapi), MS
Outlook, and a proprietary e-mailing client. I've always been curious how
you would send rich text in the body message, or insert pictures into the
body, etc. Does anyone know how to do this?

As a test, I tried using the new rich text option in the body textbox on my
form, but when you use the mapi e-mail, it will put in the control /
formatting characters rather than rich text. My test used the following
statement:

DoCmd.SendObject , , acFormatRTF, rs!EMail, , , Subject, mailtxt, False

Where mailtxt was the contents of the rich text subject box.

Many thanks all,

Andy

Aug 23 '08 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"ARC" <PC*****@PCESoft.invalidwrote:
>My app has an e-mailing feature where you can e-mail reports, as well as a
bulk e-mail feature for e-mailing all customers (as separate e-mails). I
allow the user to set the subject text, body text, and browse for
attachments.

I also allow 3 basic e-mailing options: Default mail handler (Mapi), MS
Outlook, and a proprietary e-mailing client. I've always been curious how
you would send rich text in the body message, or insert pictures into the
body, etc. Does anyone know how to do this?
One suggestion would be to do up a sample email in OE or Outlook complete with
formatting, graphics and such and then save it as a text file so you can see all the
raw HTML and embedded graphics.
>As a test, I tried using the new rich text option in the body textbox on my
form, but when you use the mapi e-mail, it will put in the control /
formatting characters rather than rich text. My test used the following
statement:
The problem is you need to set the email program setting so it puts a special line in
the header of the email. Which MAPI might not handle and SendObject certainly does
not handle. Outlook and other email sending software does have that setting.

In Outlook instead of stating:
.Body = strBody
You need to state
.HTMLBody = strBody

You could also adapt various VB 6.0 SMTP code available and write out your own
emails. Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 25 '08 #2

P: n/a
Tony Toews [MVP] wrote:
One suggestion would be to do up a sample email in OE or Outlook
complete with formatting, graphics and such and then save it as a
text file so you can see all the raw HTML and embedded graphics.
Can one do "embedded" graphics in HTML or is that only in RTF? I have
always assumed that HTML graphics require a url back to some external
source. That has always been the behavior of HTML mail that I receive.

I do HTML formatted mail from my apps quite a bit, but only for layout and
text formatting. Never even tried images because I thought they would just
see the placeholder.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Aug 25 '08 #3

P: n/a
On Mon, 25 Aug 2008 06:30:54 -0500, "Rick Brandt" <ri*********@hotmail.com>
wrote:
>Tony Toews [MVP] wrote:
>One suggestion would be to do up a sample email in OE or Outlook
complete with formatting, graphics and such and then save it as a
text file so you can see all the raw HTML and embedded graphics.

Can one do "embedded" graphics in HTML or is that only in RTF? I have
always assumed that HTML graphics require a url back to some external
source. That has always been the behavior of HTML mail that I receive.

I do HTML formatted mail from my apps quite a bit, but only for layout and
text formatting. Never even tried images because I thought they would just
see the placeholder.
That is my experience. Whenever I do HTML with graphics I have to store the
graphics at a set URL referenced by the HTML.

Wayne Gillespie
Gosford NSW Australia
Aug 25 '08 #4

P: n/a
"Rick Brandt" <ri*********@hotmail.comwrote:
>One suggestion would be to do up a sample email in OE or Outlook
complete with formatting, graphics and such and then save it as a
text file so you can see all the raw HTML and embedded graphics.

Can one do "embedded" graphics in HTML or is that only in RTF? I have
always assumed that HTML graphics require a url back to some external
source. That has always been the behavior of HTML mail that I receive.

I do HTML formatted mail from my apps quite a bit, but only for layout and
text formatting. Never even tried images because I thought they would just
see the placeholder.
I've never done this myself. However when I look at the bottom of an email source
with some embedded graphics I see the following lines.

Embedded Content: mime-attachment1.gif: 00000001,77b5ebd3,00000000,00000000
Embedded Content: imstp_pets_brown_dog_en4.gif: 00000001,0f274c04,00000000,00000000

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 26 '08 #5

P: n/a
Wayne Gillespie <be*****@NObestfitSPAMsoftwarePLEASE.com.auwrote :
>That is my experience. Whenever I do HTML with graphics I have to store the
graphics at a set URL referenced by the HTML.
And I always turn those kinds of graphics off in my email software because then email
senders can verify that you've read their emails.

Just like I use the MVP Hosts file to turn off all advertisers links in my web
browsers. And in IE I have third party cookies set to ask me.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 26 '08 #6

P: n/a
ARC
Thanks, Tony!!

So it sounds like I should try to have the rich text field, then set the
..htmlBody for an Outlook message? Will it convert all the rich text control
characters to html code?

Sounds like if the customer chooses the full outlook option (in this case I
use the outlook commands, as in your example), they might be able to have a
format other than straight text. For outlook express / windows mail users,
it sounds like they would be stuck with straight text, unless the text file
option gets me there.

Thanks again,

Andy

"Tony Toews [MVP]" <tt****@telusplanet.netwrote in message
news:uh********************************@4ax.com...
"Rick Brandt" <ri*********@hotmail.comwrote:
>>One suggestion would be to do up a sample email in OE or Outlook
complete with formatting, graphics and such and then save it as a
text file so you can see all the raw HTML and embedded graphics.

Can one do "embedded" graphics in HTML or is that only in RTF? I have
always assumed that HTML graphics require a url back to some external
source. That has always been the behavior of HTML mail that I receive.

I do HTML formatted mail from my apps quite a bit, but only for layout and
text formatting. Never even tried images because I thought they would
just
see the placeholder.

I've never done this myself. However when I look at the bottom of an
email source
with some embedded graphics I see the following lines.

Embedded Content: mime-attachment1.gif:
00000001,77b5ebd3,00000000,00000000
Embedded Content: imstp_pets_brown_dog_en4.gif:
00000001,0f274c04,00000000,00000000

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 26 '08 #7

P: n/a
ARC wrote:
Thanks, Tony!!

So it sounds like I should try to have the rich text field, then set
the .htmlBody for an Outlook message? Will it convert all the rich
text control characters to html code?
"Rich Text" in Access 2007 is really HTML so no conversion woudl be
necessary. Why they didn't just call it that is anyone's guess.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Aug 26 '08 #8

P: n/a
"ARC" <PC*****@PCESoft.invalidwrote:
>Sounds like if the customer chooses the full outlook option (in this case I
use the outlook commands, as in your example), they might be able to have a
format other than straight text. For outlook express / windows mail users,
it sounds like they would be stuck with straight text, unless the text file
option gets me there.
FWIW some emails I get have the straight text at the top with the HTML formatted text
below. Or maybe that;s how programs such as Outlook automatically work. I'm not
sure.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 26 '08 #9

P: n/a
ARC
Thanks again for your help, Tony.

In the end, I put a check box in my own e-mailing window that says "Enable
HTML / Rich Text". If they check it, I change the textformat of the body
text box to rich text, and I only allow the option if they have Outlook
enabled as their e-mail method, not with Express / Mapi. Works like a charm.

Andy
"Tony Toews [MVP]" <tt****@telusplanet.netwrote in message
news:5l********************************@4ax.com...
"ARC" <PC*****@PCESoft.invalidwrote:
>>Sounds like if the customer chooses the full outlook option (in this case
I
use the outlook commands, as in your example), they might be able to have
a
format other than straight text. For outlook express / windows mail users,
it sounds like they would be stuck with straight text, unless the text
file
option gets me there.

FWIW some emails I get have the straight text at the top with the HTML
formatted text
below. Or maybe that;s how programs such as Outlook automatically work.
I'm not
sure.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 27 '08 #10

P: n/a
ARC
Hey Tony,

I just wanted to thank you again. User's of my program that have full
outlook are loving the new rich text option!! Many thanks again,

Andy

Sep 4 '08 #11

P: n/a
"ARC" <PC*****@PCESoft.invalidwrote:
>I just wanted to thank you again. User's of my program that have full
outlook are loving the new rich text option!! Many thanks again,
You're quite welcome. Glad I could help.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Sep 5 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.