View Single Post
  #6  
Old June 5th 07, 06:11 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default Problem using Outlook Redemption VBA code

Except that I would already have decided which account and don't want
to change it.

I experimented with some other things and the problem I am running
into is that trying to change a field for a message during an event
does not get reflected in the main window after the event has finished
(e.g. on opening a new Inspector) unless you force Outlook to refresh
its cache (I suppose) by closing the message, going into another
folder and then returning and opening the message again. Then it
reflects the changes I made.

Is this an insurmountable problem? I tried using your MAPIUtils
object and making a call to HrSetOneProp with bSave set to TRUE and it
works but not until you force Outlook to refresh its view of the
item. Most of the examples I see are about setting properties for
items that have been created in the code and are then saved. When
these are opened in the main Outlook window then they will reflect
what has been done. I haven't seen any examples for modifying
properties "on the fly" which is what I want to do. Unless I can
think of a way to do the work whilst Outlook is occupied with other
things, as it were (I used to call that 'batch processing').

Any ideas?


On Jun 5, 5:06 am, "Dmitry Streblechenko" wrote:
You can try to create a rule that runs when a message is sent.

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message

oups.com...

Actually there are a number of rules that operate on the message - the
first rule contains my "run a script" option. Perhaps I should make
it an event that runs when I hit the reply button - is that possible?


On Jun 2, 6:28 pm, wrote:
Yes, there is another rule that moves the item to a folder. Are rules
run asynchronously - I had thought they were sequential. Should I
incorporate all the preferred actions into the code as well? That is
not as flexible as using rules but if it gets the job done I might
have to live with it.


By the way, thanks for your great work with Redemption!


Regards,
Wazza


On Jun 2, 3:27 am, "Dmitry Streblechenko" wrote:


Does any other rule touch the same item?
The problem might be a conflict between inpItem and Item (they both
refer to
the same message).


Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool



Ads