Sorry ... JFYI ... How to dump all contacts in the Windows Address Book ... ;-)
> Spend a whole night, with the following code, but can only put stuff
> into the WAB, not get a list of e-mail address ...
Really simple to dump all the contacts ...
import win32com.client
objSession = win32com.client.gencache.EnsureDispatch("WABAccess.Session")
print objSession
objSession.Open(False)
if objSession.Identities.LastIdentity ==
"{00000000-0000-0000-0000-000000000000}":
print "No Identity Selected"
else:
print "The Identity " +
objSession.Identities(objSession.Identities.LastIdentity).Name + " is
selected"
print objSession.Identities.DefaultIdentity
print objSession.Identities.Count
print objSession.Containers.Count
for oCont in objSession.Containers:
for oItem in oCont.Elements:
print oItem.Name
objSession.Refresh
objSession.Close
print "Done."
Now to figure how to get only contacts with fax numbers and print the
name and fax number ...
Thanks
Mailed
LeeT
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32