Create message body for MAPI

Create message body for MAPI

Post by Jack MacDo » Tue, 16 Sep 2003 10:27:47


Trying to use Access 97 to create a message for sending via Pegasus
through MAPI. I use conventional VBA to construct a string that
contains my message in the desired format, but that's not how Pegasus
renders it. Can anybody offer any advice how to construct a message
compatible with Pegasus.

I am using this Access command to send the message to Pegasus

DoCmd.SendObject objecttype:=acSendNoObject, _
TO:=txtEmail, _
Subject:="Trip Itinerary", _
messagetext:=sBody

where the sBody variable contains the following five lines:

< -- start here -->
Trip itinerary
Customers: 5
Tanks: 10
km: 1000
hours: 25
<-- end here -->

but I am getting one continuous line in the Pegasus editor. A square
box (unprintable character??) is displayed between the items, rather
than the desired line break.

I use the VBA constant "vbCrLf" to break the lines in my VBA code. It
looks correct when viewed within the VBA Immediate Window, but it is
rendered improperly in the Pegasus editor.

Tried entering two vbCrLf between each line, but that made it worse.
Unfortunately (!!) the code works properly on computers that use
Outlook instead of Pegasus.



=======================================================
Jack MacDonald
remove UPPERCASE LETTERS from email address
Vancouver, B.C. Canada
Info about MSAccess user-level security
www.geocities.com/jacksonmacd
 
 
 

Create message body for MAPI

Post by Martin Ire » Wed, 17 Sep 2003 02:06:13

It sounds like your program is not concatenating the various lines
correctly.
Are you coding something equivalent to:
sbody = line1 + vbcrlf + line2 + vbcrlf

??

 
 
 

Create message body for MAPI

Post by Jack MacDo » Wed, 17 Sep 2003 10:53:56

That's exactly what I have been doing -- except using & instead of +.
I will try it that way, too.


On Mon, 15 Sep 2003 11:06:13 -0600, Martin Ireland





=======================================================
Jack MacDonald
remove UPPERCASE LETTERS from email address
Vancouver, B.C. Canada
Info about MSAccess user-level security
www.geocities.com/jacksonmacd