Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to beautify email message to be sent from VFP

Status
Not open for further replies.

madhatter2002

Programmer
Nov 6, 2002
73
PH
Hi Techies,

Here's another question that I hope would tickle your brains. I am already familiar with sending email using VFP. However, the messages that is in the email body is only pure text, wherein the format or presentation (like fonts) is inherited from the outlook setting.

By using the html body, yeah the message can be modified. Question is this, is there a way to further manipulate the presentation of the email body without using the html option?

Also, is it possible to insert tab spaces in the body of the email??

Hope my questions are clear, for info I am using VFP 6, and outlook automation for sending the email message.

thanks!
 
Good question!

Try looking at the object model and manipulating the RTF format codes.

Maybe...

Darrell

P.S.[tt]

as far as spaces go - the standard text format
will automatically use spaces. HTML will render
them vis-a-vis the standard HTML behaviours.
i.e. create a HTML page and load the created
page into the HTMLbody of the email..[/tt]



 
Hi Mike,

The reason I want it other than html option is, I find it very confusing to code using the html formats or approach, so I am looking for another way.

And besides, I am not that too familiar with the html method of encoding.

This would be a good way of learning the other properties.

Since we are in the HTML topic, would it be the same it I lift the html code generated from front page or Word and just paste it as the html body?? or do I need to make other adjustment or modification?

 
madhatter2002

Since we are in the HTML topic, would it be the same it I lift the html code generated from front page or Word and just paste it as the html body?? or do I need to make other adjustment or modification?

That is probably your best bet. Load a Word document saved as an HTML page into a string, and call your string as the HTMLBody property.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
madhatter2002,

would it be the same it I lift the html code generated from front page or Word and just paste it as the html body?? or do I need to make other adjustment or modification?

That's exactly what I do. You can either take the entire web page, or just a portion of it. I usually take the bit between the <body> and </body> tags.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Hi Mikes,

Done with this, I just finished a crash course just about 30 minutes ago, I had to retrace the HTML code generated by Word, and fortunately after some trial and error I was able to get my desired format.

thanks for the directions.
 
I'd try not to use Word's html code unless you know the
intended recipients are using Microsoft products.

Word generates some non-standard html elements that only
work properly with MS browser rendering engines.

Better to use simpler html elements.

Darrell


Below are two examples of the above text as html code.
The first is the most simple, the second was generated by Word.

As you can see, using simpler HTML creates much smaller mail messages.


Example 1:
[tt]
<html><body>
I'd try not to use Word's html code unless you know the
intended recipients are using Microsoft products.

Word generates some non-standard html elements that only
work properly with MS browser rendering engines.

Better to use Html 3.0 - 4.0 and or Dtml elements.

Darrell
</body></html>
[/tt]

Example 2:
[tt]
<html xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:w="urn:schemas-microsoft-com:eek:ffice:word"
xmlns="
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="WordHtml_Example_files/filelist.xml">
<title>I'd try not to use Word's html code unless you know the</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Darrell C. Greenhouse</o:Author>
<o:LastAuthor>Darrell C. Greenhouse</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>1</o:TotalTime>
<o:Created>2004-03-06T23:18:00Z</o:Created>
<o:LastSaved>2004-03-06T23:19:00Z</o:LastSaved>
<o:pages>1</o:pages>
<o:Words>40</o:Words>
<o:Characters>234</o:Characters>
<o:Company>BlackHawk Computer Engineering</o:Company>
<o:Lines>1</o:Lines>
<o:paragraphs>1</o:paragraphs>
<o:CharactersWithSpaces>273</o:CharactersWithSpaces>
<o:Version>10.4219</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0mm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0mm 5.4pt 0mm 5.4pt;
mso-para-margin:0mm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal>I'd try not to use Word's html code unless you know the<o:p></o:p></p>

<p class=MsoNormal>intended recipients are using Microsoft products.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Word generates some non-standard html elements that only<o:p></o:p></p>

<p class=MsoNormal>work properly with MS browser rendering engines.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Better to use Html 3.0 - 4.0 and or Dtml elements.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Darrell</p>

</div>

</body>

</html>
[/tt]
 
Thanks for the info Darrell, but since I was merely using the formatting of the HTML option, I did manage to strip the parts that I think would encounter some problems for non-MS products, let's say I tried to make it simple without losing the Formats.
 
darrellblackhawk,

LOL! [laughtears]

boyd.gif

craig1442@mchsi.com
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top