Problem with Item_Forward Event

A

Amit Basu

Hi,

I have a Custom Outlook form where I have a handler for the Item_Forward
event. I need to do this to put some values in To and CC addressee
fields whenever this form gets forwarded from anybody to anybody else.
It works fine when the original sender of the form UserA, sends it to
UserB and UserB forwards the from to UserC.
But when UserC tries to forward the form to say UserD, the Item_Forward
event is not fired!!
Is this by design? This is not a one-off form. I am using Outlook 2000.
Please help.

TIA.
Amit.
 
S

Sue Mosher [MVP]

How do you know this is not a one-off form? Does the Forward action point to a published custom form? Does User C have access to the published form definition?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
A

Amit Basu

Hi Sue,

The Forward action did not point to the Custom form. But it was showing
the form and sending it properly every time. All users had access to the
form definition as it all users are in one domain and the form is
published in the Organizational Forms Lib. The problem was that while
forwarding the second time, the Item_Forward event was not being fired.
Also Item_Open would fire when I open the form for composing the first
time or open the email upon receipt but it wouldn't fire when I press
Forward after I open the email with the form. Also the Item_Send event
was not firing either when I was clicking the Send button, while
forwarding.

When I made a change and made the Forward Action point to the Custom
Form, a different set of behaviors occurred. Item_Open would fire
properly but every time I try to Send the form, I would get this Outlook
error message:

The Send Operation failed because the item was deleted before it was
sent.

What is causing this error? I had the same problem when I made the Reply
or Reply All actions point to the form. I would get this same error
while replying to an email with this form.

This time, however, the Item_Open and Item_Send events fired. So I guess
as I didn't have the Forward action pointing to this Form, its Item_Open
and Item_Send events were not firing, right?

Thanks again.
Amit.


From: Sue Mosher [MVP]
Date Posted: 12/4/2003 8:25:00 AM



How do you know this is not a one-off form? Does the Forward action
point to a published custom form? Does User C have access to the
published form definition?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

Unless the custom form is specified in the Forward action, the form one-offs when it's forwarded, which means code won't run on the forwarded item. So it will work when the first recipient handles it, but not the second.

What code is running in the Item_Send event handler?
 
A

Amit Basu

Sue,

I found the problem. I needed to save the mail in a folder before
Sending it and therefore I had this code

Item.Move(Folder)

in my Send event handler. This was working fine while Sending the form
the first time but wouldn't work while forwarding or replying to the
mail. I changed the code to

Set oCopy = Item.Copy()
oCopy.Move(Folder)

and now it is working fine.

Thanks a lot for your help.

Amit.

Unless the custom form is specified in the Forward action, the form
one-offs when it's forwarded, which means code won't run on the
forwarded item. So it will work when the first recipient handles it, but
not the second.

What code is running in the Item_Send event handler?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top