This works for me on the receiving side:
USE employee
Set Textmerge to memvar m.lcMessage noshow
Set textmerge on
\\<HTML><BODY><PRE>
scan
\<<First_name>> | <<Last_Name>> | <<Birth_date>>
EndScan
\</PRE></BODY></HTML>
Set Textmerge to
Set Textmerge off
#include outlook.h
Local oOL as Outlook.Application, oMailItem as Outlook.MailItem
oOL = CreateObject('Outlook.Application')
oMailItem = oOL.CreateItem(olMailItem)
oMailItem.To = "somebody@somewhere.com"
oMailItem.Subject = "Formatted text test"
oMailItem.HTMLBody = m.lcMessage
oMailItem.Send()
I said extra spaces because w/o them sending messages here is problematic.
Cetin
>Cetin,
>
>I tried it, and everything lines up nicely, but ...
>
>When the message arrives, even though Outlook nows it's HTML, it shows it with tags and all.
>
>What should I do? BTW, why the extra spaces in pre /pre?
>
>
>>Peter,
>>Why don't you simply turn it to an HTML message. You could then add a PRE tag. ie:
>>
>>cMyMessage = "My plain text monospaced message ...."
>>cMyMessage = TextMerge('<HTML><BODY>< PRE ><<m.cMyMessage>>< /PRE ></BODY></HTML>')
>>
>>PS: Intentionally placed spaces for < PRE > inside to be able to send.
>>Cetin
>>
>>>Sergey,
>>>
>>>Yes, that had occured to me as well - so how does one force the receiving Outlook to view a particular message with a monospace font?
>>>
>>>It's not HTML, btw. it's plain text, that I'm trying to send with Outlook 2000, and I know, because I set it up to do so.
>>>
>>>Because I'm still testing, I'm the only receipient. So I also know that I get it as Rich text. Which really is not so bad, except the font is all wrong, and I don't want the receipient to have to choose a monospace font.
>>>
>>>BR
>>>
>>>
>>>>How do you know that recipient is viewing it as HTML? Maybe the Font for plain text messages is set to proportional font which will screw the text formatting as well?
>>>>
>>>>>I do, and it does.
>>>>>
>>>>>>If you fill the .Body (rather than the .HTMLBody) it should arrive as text. Or does the recipient's Outlook still looks at the message as HTML?