(*.RTF) as message body to Outlook, Possible??? 
Author Message
 (*.RTF) as message body to Outlook, Possible???

from Access97 to Outlook98

Has any one here found a way to program a *.rtf file directly into the
message body of an email into Outlook or otherwise?

I do not want the *.rtf as an attachment but direct into the body of the
message.


Howard



Fri, 04 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
I don't have the solution, but have been also looking for something like
this, so if anyone replies can you do it in public and not by email (or
both!)

Thanks

P. Sheppard



Fri, 04 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
Use the SendObject command.  It will do exactly that.


Quote:
>I don't have the solution, but have been also looking for something like
>this, so if anyone replies can you do it in public and not by email (or
>both!)

>Thanks

>P. Sheppard



Fri, 04 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
A Microsoft DLL is available for download that will let you write RTF into
the message body:

http://support.microsoft.com/support/kb/articles/q172/0/38.asp

--
Regards,

Randy Byrne, MVP - Outlook
http://www.microeye.com
http://www.outlookexchange.com
Building Applications with Microsoft Outlook 2000
Microsoft Press, June 1999
http://www.microeye.com/books
Micro Eye ZipOut
http://www.microeye.com/zipout


Quote:
> Use the SendObject command.  It will do exactly that.



> >I don't have the solution, but have been also looking for something like
> >this, so if anyone replies can you do it in public and not by email (or
> >both!)

> >Thanks

> >P. Sheppard



Fri, 04 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
Dan,

Are you saying use sendobject to send the *.rtf direct to Outlook as the
"body" of the message, just as if you opened a 'new message'  (the
properties were set to *.rtf format),  and when the user opens the email
message it is already in very beatiful formatting, WITHOUT having to open an
attachment?

Or as an attachment?


if you have done it.  Your code is welcome.  I am sure others would
appreciate it also.

BTW, there is a reference to a web page in the Access-L list archives that
will allow you to loop through a record set, create specific reports to
specific recipients in *.rtf, *.xls, *.html and then email them with
sendobject.  ALL automatically!  Let me know if you need the url.

I want to use this same code to send the *.rtf file direct to Outlook in the
message of the body and ELIMINATE the need to open an attachment.

Quote:

>Use the SendObject command.  It will do exactly that.



>>I don't have the solution, but have been also looking for something like
>>this, so if anyone replies can you do it in public and not by email (or
>>both!)

>>Thanks

>>P. Sheppard



Sat, 05 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
Great!

Now, can I do this with only MS Office97(preferably from Access) and
Outlook98?

Or do I need something else installed?


Quote:
>A Microsoft DLL is available for download that will let you write RTF into
>the message body:

>http://support.microsoft.com/support/kb/articles/q172/0/38.asp

>--
>Regards,

>Randy Byrne, MVP - Outlook
>http://www.microeye.com
>http://www.outlookexchange.com
>Building Applications with Microsoft Outlook 2000
>Microsoft Press, June 1999
>http://www.microeye.com/books
>Micro Eye ZipOut
>http://www.microeye.com/zipout



>> Use the SendObject command.  It will do exactly that.



>> >I don't have the solution, but have been also looking for something like
>> >this, so if anyone replies can you do it in public and not by email (or
>> >both!)

>> >Thanks

>> >P. Sheppard



Sat, 05 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
I had a look at sendObject and after cursing for not knowing about such a
simple command, I had a go. It only sends reports or any other objects for
that matter as attachments, not to the body text which is what I also
wanted. However Dan Zwiebel (Dan, your name means onion in german!!) has
replied (see posting above) and reckons there is a DLL out there. I am going
to investigate...

The SendObject command is pretty damn {*filter*} though. You can send tables as
Excel files or forms as HTML (I think.. didn't test that one out!) and so
on. A very useful tool for sending out reports... But, like you, I wanted to
be able to send Rich Text in the body....

Hope you also find what you want...

Philip

PS I see you post to microsoft.public.outlook.program_vba. For some reason I
cannot reach that newsgroup!


Quote:
> Dan,

> Are you saying use sendobject to send the *.rtf direct to Outlook as the
> "body" of the message, just as if you opened a 'new message'  (the
> properties were set to *.rtf format),  and when the user opens the email
> message it is already in very beatiful formatting, WITHOUT having to open
an
> attachment?

> Or as an attachment?


example
> if you have done it.  Your code is welcome.  I am sure others would
> appreciate it also.

> BTW, there is a reference to a web page in the Access-L list archives that
> will allow you to loop through a record set, create specific reports to
> specific recipients in *.rtf, *.xls, *.html and then email them with
> sendobject.  ALL automatically!  Let me know if you need the url.

> I want to use this same code to send the *.rtf file direct to Outlook in
the
> message of the body and ELIMINATE the need to open an attachment.



Sun, 06 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
sorry I meant to say you should look at Randy Byrne's posting not Dan
Zwiebel's. However Zwiebel still does mean onion!! :)


Sun, 06 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
I had a look at the download, and here is a sample text excerpt from the
readme file:

Sample Code
-----------
The following sample code assumes that you have already declared the
DLL function as described above. For a more complete example, please
see the Visual Basic project accompanying this sample.

- WriteRTF Sample. (This code assumes you already have a variable
  called cRTF defined which contains RTF-formatted text.)

What the hell is a Rich Text variable? How do I define one? I would like to
just try out a very simple Rich Text email...

Thanks for any help

Philip



Quote:
> A Microsoft DLL is available for download that will let you write RTF into
> the message body:

> http://support.microsoft.com/support/kb/articles/q172/0/38.asp

> --
> Regards,

> Randy Byrne, MVP - Outlook



> > Use the SendObject command.  It will do exactly that.



> > >I don't have the solution, but have been also looking for something
like
> > >this, so if anyone replies can you do it in public and not by email (or
> > >both!)

> > >Thanks

> > >P. Sheppard



Sun, 06 Jan 2002 03:00:00 GMT  
 (*.RTF) as message body to Outlook, Possible???
Hi Howg and Philip,

i just read your problem description and a found the following MSDN artcile
about importing formatted text.
You have to switch to the MAPI interface !

################ text start ########################

Incorporating Formatted Text and Attachments

A client application can send or receive a message that includes formatted
text and attachments. Clients that want to work with formatted text must use
the MAPI client interface. CMC, Simple MAPI, and the CDOLibrary do not
support formatted text in messages.

Design Tasks

Decide on a mechanism for displaying formatted text. You can use the Rich
Text Format (RTF) supported by Microsoft or your own customized format. See
Formatted Text in MAPI.
Decide on the types of attachments that your client will handle. See
Attachments.
Decide if and how your client will activate and save its attachments. See
Creating a Message Attachment.
Implementation Tasks
To send a message with formatted text

Call the IMAPIProp::OpenProperty method to open the PR_RTF_COMPRESSED
property, setting both the MAPI_CREATE and MAPI_MODIFY flags. MAPI_CREATE
ensures that any new data replaces any old data and MAPI_MODIFY enables your
client to make those replacements.
Call the WrapCompressedRTFStream function, passing STORE_UNCOMPRESSED_RTF if
the message store sets the STORE_UNCOMPRESSED_RTF bit in its
PR_STORE_SUPPORT_MASK property, to get an uncompressed version of the
PR_RTF_COMPRESSED stream returned from OpenProperty.
Write the message text data to the uncompressed stream returned from
WrapCompressedRTFStream.
If the message data is an attachment, write the character token "\objattph"
followed by a space to the stream instead of the attachment.

Set the PR_RENDERING_POSITION property of the attachment to a value that
will increase with each attachment. For example, the first attachment could
be assigned 1 as its PR_RENDERING_POSITION, the second one 2, and so on.

Commit and release both the uncompressed and compressed streams.

If the message store does not support RTF as indicated by the absence of the
STORE_RTF_OK setting in the PR_STORE_SUPPORT_MASK property, call the RTFSync
function and pass the RTF_SYNC_RTF_CHANGED flag.

For more information, see Supporting Formatted Text in Outgoing Messages:
Client Responsibilities.

To read a message with formatted text

Call RTFSync to synchronize the message text with the formatting if the
message store is not RTF-aware and the PR_RTF_IN_SYNC property is missing or
set to FALSE. The RTF_SYNC_BODY_CHANGED flag should be passed in the ulFlags
parameter. Clients working with RTF-aware message stores need not make the
RTFSync call because the message store takes care of it.

Call IMAPIProp::SaveChanges if the message has been updated.

Call IMAPIProp::OpenProperty to open the PR_RTF_COMPRESSED property.

Call the WrapCompressedRTFStream function, passing the
STORE_UNCOMPRESSED_RTF flag if the message store sets the
STORE_UNCOMPRESSED_RTF flag in its PR_STORE_SUPPORT_MASK property, to create
an uncompressed version of the compressed RTF data.

Display the uncompressed RTF data.

If there are attachments in the message, perform the following tasks in
addition to the preceding steps:

Before reading from the uncompressed RTF stream, sort the message's
attachment table on the value of the PR_RENDERING_POSITION property. The
attachments will now be in order by how they appear in the message.

As your client scans through the RTF stream, check for the token
"\objattph". The character following the token is the place to put the next
attachment from the sorted table. Handle attachments that have set their
PR_RENDERING_POSITION property to -1 separately.

For more information, see Supporting Formatted Text in Incoming Messages:
Client Responsibilities.

################ text end ########################

Regards

Bernd Bau

Cycos the communications factory



Sun, 14 Apr 2002 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. RTF message body from OOM?

2. Copy rtf message body

3. Put formatted (.rtf) text in message body from Access

4. RTF message body from ItemSend?

5. placing rtf in the message body

6. Need help with RTF in body of an Outlook XP e-mail

7. Pasting excel range into outlooks body (rtf)

8. Replacing message body text in Outlook 2000 7 XP

9. Outlook Automation - SaveAs creates message with empty body

10. find/replace in outlook message body

11. Body property of Message in Outlook Object Model

12. Sending HTML In Body of Outlook Message using VBSCRIPT (WSCRIPT)

 

 
Powered by phpBB® Forum Software