Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook PST Files
Message
From
19/01/2009 11:15:13
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01374986
Message ID:
01375096
Views:
13
>>>>Hi All,
>>>>
>>>>Using COM automation how can I open an Outlook PST file and close it again? I see how I can parse folders and emails of an existing "store" but not sure how to open a PST file and close it again.
>>>>
>>>>I see that AddStore will open a PST file. How to close it though?
>>>>
>>>>TIA
>>>
>>>Like:
>>>
>>>=myNameSpace.RemoveStore(myNameSpace.Folders(6))
>>
>>Thanks Yuri. What is the easiest way to know which store number is the store I just added? i.e. in your example Folders(6) ?
>
>
>As an example:
>
>lcFolderPath="c:\outlook\archive.pst"
>lo=GETOBJECT(,"Outlook.Application")
>WITH lo.GetNamespace("MAPI")
>	ln=.Folders.Count
>	.AddStore(lcFolderPath)
>	* do whatever you need to do
>....
>
>	.RemoveStore(.Folders(ln+1))
>ENDWITH
>lo=null
>
>
>You may refer to Folder Name, folder index, Folder entry ID. I would use Folder entry ID since there could be several folders having the same name, there may be other folders added/removed, or folders may be reorganized. With folder entry ID you need to scan folders checking their ID to get it.
>
>Best Wishes

Thanks Yuri. I am progressing with it now.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform