[python-win32] force outlook ui update

Christan K. ckkart at hoc.net
Thu Oct 30 10:13:08 CET 2008


Tim Roberts <timr <at> probo.com> writes:

> 
> Christan K. wrote:
> > Tim Roberts <timr <at> probo.com> writes:
> >   
> >> Christian K. wrote:
> >>     
> >>> the subject field in the inbox list changes immedately but the subject
> >>> line of the message itself (either shown in the embedded panel or in
> >>> its own frame) does not. After a couple of other actions, i.e.
> >>> selecting and deslecting other items the message subject will be
> >>> updated in every place.
> >>>
> >>> Is there a way to force an UI update?
> >>>       
> >> No.  MAPI controls the mail engine, not the user interface.
> >>     
> >
> > Actually I did not expect to find something within mapi. Do you have any 
ideas 
> > where to look for these gui related issues?
> >   
> 
> I guess it depends on what you are really trying to do, and on how
> general you need this to be.  MAPI is an abstraction.  There is no
> promise that MAPI requests will have any effect at all on a user
> interface.  The fact that you are seeing something update at all
> surprises me.  The effect would be very different if you happened to be
> running a different MAPI provider.  It might not even show a UI at all.
> 
> If what you really want to do is control Outlook, then Tim G is right --
> you need to control Outlook through Outlook's object model.  If what you
> really want to do is send email, then MAPI is a more general answer, but
> you give up the user interface.

Thank you both for your comments. In fact I naivly assumed that, thinking in 
terms of a mvc pattern, the outlook gui was the view and mapi manipulated the 
model so that the gui would be aware of every change in the model. Obviously 
this is not the case. I am using the msgstore module from the spambayes project 
to modify the mail subjects according to some special rules, triggered by 
clicking on CommandBarButtons. So I guess I wil have to look into Outlook's 
object model as Tim G. suggested. 

Thanks, Christian








More information about the python-win32 mailing list