COM Method/Property access

Nikolai Kirsebom nikolai.kirsebom at siemens.no
Wed May 3 10:11:00 CEST 2000


I'm using Python as COM client with Outlook 97 as the server.  In the
documentation on Outlook, a received mail item has the method
'Forward', which according makes a new mail item which may be
forwarded to another recepient (like pressing the forward button in
outlook 97).

I've noticed that I have to use the following syntax to get this to
work.

fwdItem = mailItem.Forward
fwdItem.To = "someone at world"

Since forward is a method I would have expected the following syntax
to be the correct one:

fwdItem = mailItem.Forward()

Can anyone explain why the 'method' should be called without the
braces.

Nikolai




More information about the Python-list mailing list