1

Okay, so here is my current problem which can be broken down into several parts, and any advice on any part would be greatly appreciated!

  1. Overview of general problem: I have several PST files in which every email contained within the PST files has a tag that I need to remove. The end goal is a PST file minus the tag (the tag is 3 lines of text in each email bracketed on the top and bottom by lines of *).

  2. To solve this, I wanted to be able to manipulate the PSTs in Python.

  3. In order to manipulate in Python, I found out that i could use Outlook Redemption and its MAPI tables (I have not used any MAPI tables before).

  4. Outlook Redemption is deployed in a DLL file, and I have never had to import a DLL file into Python before, so I checked Stack Overflow and got this answer. However, I don't understand these lines:

    # Actually map the call ("HLLAPI(...)") to a Python name. 
    hllApi = hllApiProto (("HLLAPI", hllDll), hllApiParams) 
    

    What should I put in the space denoted by "...", and does he mean anything special by mapping it to a Python name?

Like I said, any help / advice / suggestions / pity would be greatly appreciated.

Community
  • 1
  • 1

1 Answers1

1

I do not use Python, but it looks like you can use Redemption just like any other COM object: Modifying Microsoft Outlook contacts from Python

import win32com.client 
import pywintypes 

session = win32com.client.Dispatch("Redemption.RDOSession") 
...
Community
  • 1
  • 1
Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • The only thing I would add is make sure you include the line `win32.com.client.gencache.EnsureDispatch("Outlook.Application")` because sometimes if you do not have that you could end up not finding everything you need. – demongolem Sep 26 '12 at 20:45