3

I am using pywin32 mapi routines to interact with my outlook contacts store. I am trying to set the PT_BIRTHDAY property and have the following code for doing that:

The conversion from and to FILETIME values is from filetimes.py available at: http://reliablybroken.com/b/wp-content/filetimes.py

    dt = datetime.strptime('1980-01-01','%Y-%m-%d')
    filetime = filetimes.dt_to_filetime(dt)
    msg.SetProps([(mapitags.PR_BIRTHDAY, filetime)])

I get an OverflowError: Python int too large to convert to c long

I am on a 32 bit machine, and I understand FILETME is a 64 bit value. I am at a loss. How can I set the underlying MAPI property using this library? Is there a workaround?

Karra
  • 659
  • 1
  • 5
  • 16

0 Answers0