473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Rich Text in an e-mail?

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
11 11980
"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
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
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
"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
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
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
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
"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alfredo Agosti | last post by:
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo...
1
by: PC User | last post by:
I found this Rich Text Editor and I've been trying to recreate it in my own application. I've had trouble with the COMCTL.ImageListCtrl and the COMCTL.Toolbar to recreate the toolbar. And I've...
1
by: Peter | last post by:
I have written a small terminal app that reads and writes to the serial port. In particular as the data is read from the serial port it is appended to the rich text box. The problem I am...
4
by: David Davis | last post by:
Woll2Woll has a product for Delphi called Infopower which has a rtf control with a built-in word processor. Does anyone know of a third party control that has the same capabilities. I don't have...
0
by: ray well | last post by:
hi, my app has two parallel rich text boxes containing the same content in 2 different languages. the lines parallel each other, line #3 in english contains the same content as line #3 in...
1
by: tomi.trescak | last post by:
Hi I have a problem with storing rich text in MySQL. I store rich text in MySQL (in column with type "text") which i get from Rich Textbox control. When i do reverse processing by trying to...
9
by: Neil | last post by:
I need to implement a rich text box in an MDB file for a user base that consists of Access 2000 and Access 2002. Unfortunately, I'm using Access 2003 on my development machine. My understanding is...
5
by: ARC | last post by:
Just found out something interesting with Access 2007... In table design, if you set a memo field to the new rich text option, and put that control on a form, set the control to rich text, you can...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.