I am going to write code to extract information about the contents of PST files, such as general messages, a list of subfolders, the number of messages in a folder, the name of the email subject and the date of sending / receiving for each message.
This is a work in progress, and I should familiarize myself with Ruby / Outlook / MAPI when I go.
I work on Windows with the following code snippet to understand how I can access the contents of the PST:
outlook = WIN32OLE.new('Outlook.Application')
mapi = outlook.GetNameSpace('MAPI')
outlook.Session.AddStore('C:/test.pst')
Although I can add the pst file via the file name to delete it, I need to know what name was assigned to the file in Outlook. This is normal. If I am configured manually, but I want it to run autonomously.
Is there a way that I can extract and assign pst 'name' to a variable after loading to get around this problem or is there another way to upload pst file (s) that I don't know about?
source
share