include Code in Mail

  • Thread starter Thread starter Ray Mollenhauer
  • Start date Start date
R

Ray Mollenhauer

Hello
In Forms it is easy to include code which is performed when the
recipient open the Mail. How can this be achieved in mails which are
send (build) with cdo ?

The task is to send an mail with to an recipient with cdo, but when
this recipient opens the mail, not this mail should be opened, but an
posting in an public folder -forexample with the same subject as the
mail.

I know how to send an mail with cdo, i know how to write code for a
form (Mail)that not this mail is opened but the posting in the public
folder
function Item_open() item.close set myitem=myfolder.items("subject")
myitem.display end function

But how to put it all together?
My Idea was by sending the message, give the message another
messageclass,
with the: mymessage.fields("http://.......messageclass")="mymessageclass"
This another form should contain the code to open the post in the PF
based on the subject.
It Looks complicated and it do not works.
To include the code in the original mail, would be much better but i
do not know how.

For any hints i would be grateful


Best Regards
Ray Mollenhauer
 
If both sender and recipient are in the same Exchange organization, this is
possible with a published custom form published to the Organizational Forms
library. Otherwise, no or at least not without a lot of cooperation from the
recipient.
 
Thanx for your hint.
sender and recipent are in the same Exchange Org. And the Form is
Published in the Org Libary. But the code is not running on the
Exchange Server. I tried several suggestions from other postings
without success.
Where i can find a working piece of code,which i can include in my
workflow script ?

Best Regards
Ray Mollenhauer
 
The set the message class for a message created with CDO, use the
Message.Type property.

If a form doesn't run code after you have sent or saved an item created with
the form, you probably have done something to "one-off" the form. Outlook
2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email
Security Update will not run code on one-off forms; see
http://www.outlookcode.com/d/secforms.htm for more information on this
issue.

To ensure that a form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties)
tab of the form is *not* checked. [1]

-- For in-house corporate use with Exchange Server, publish the form to the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who need
to use it with instructions to publish it with the same form name that you
used.

Many other things can cause one-off forms. If the above steps don't work on
a new item created with your form, see
http://www.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[1] Whenever you publish a message form, Outlook will suggest that you may
want to check the "Send form definition with item" box to ensure that the
recipient will have the form, especially if you're sending to someone via
the Internet. In the current Outlook security environment, this suggestion
is obsolete. Ignore it unless your form has no code behind it.


--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ray Mollenhauer said:
Thanx for your hint.
sender and recipent are in the same Exchange Org. And the Form is
Published in the Org Libary. But the code is not running on the
Exchange Server. I tried several suggestions from other postings
without success.
Where i can find a working piece of code,which i can include in my
workflow script ?

Best Regards
Ray Mollenhauer


"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in message
If both sender and recipient are in the same Exchange organization, this is
possible with a published custom form published to the Organizational Forms
library. Otherwise, no or at least not without a lot of cooperation from the
recipient.
 
Back
Top