T
Tony Gravagno
I have a rule that runs a script which checks for and changes text in
the subject. As an example, it will replace "RE: RE: " with "RE: ".
To save the new subject:
myItem.Subject = newsubject
myItem.Save
I see the save is only partially working. This rule is the first rule
in the set, so after this change is done the item is subjected to many
more rule tests. The item is eventually filtered to some folder. In
the explorer for the destination folder I see the unmodified subject,
but if I Reply or Forward, I sometimes see the modified subject! This
is inconsistent and I'm trying to figure out the pattern.
I guess what I'm missing is insight into the sequence of events and
how they affect the olMailItem. The rule is run, the item is changed,
but it's still in the Inbox. (I can stop the code in debug and
actually see the item in the Inbox with the modified subject.) Other
rules are run, but it seems they run on a copy of the original
instance in memory, not the modified item in the Inbox.
So as we progress from one rule to the next, how do we guarantee that
updated instances of inbound mailitems will be used for subsequent
processing?
Thanks!
Tony
the subject. As an example, it will replace "RE: RE: " with "RE: ".
To save the new subject:
myItem.Subject = newsubject
myItem.Save
I see the save is only partially working. This rule is the first rule
in the set, so after this change is done the item is subjected to many
more rule tests. The item is eventually filtered to some folder. In
the explorer for the destination folder I see the unmodified subject,
but if I Reply or Forward, I sometimes see the modified subject! This
is inconsistent and I'm trying to figure out the pattern.
I guess what I'm missing is insight into the sequence of events and
how they affect the olMailItem. The rule is run, the item is changed,
but it's still in the Inbox. (I can stop the code in debug and
actually see the item in the Inbox with the modified subject.) Other
rules are run, but it seems they run on a copy of the original
instance in memory, not the modified item in the Inbox.
So as we progress from one rule to the next, how do we guarantee that
updated instances of inbound mailitems will be used for subsequent
processing?
Thanks!
Tony