We had a customer recently who was asking how to tell a PST had been configured as a Sharepoint PST, so they could exclude it from some processing they were doing. After some digging, I found the property that Outlook itself uses to determine a PST is a Sharepoint PST, and development gave me permission to document it:
#define PR_ASSOCIATED_SHARING_PROVIDER PROP_TAG(PT_CLSID, 0x0EA0)
To check if a PST is a Sharepoint PST, mount the PST using OpenMsgStore, then call GetProps on the message store object requesting this property. If it exists, you can assume the PST has been configured for Sharepoint. If it doesn’t exist, the PST has not been configured as a Sharepoint PST.
Could you also compare the returned PR_MDB_PROVIDER property value to the one identifying a SharePoint PST? I was under the impression this property would be the same for all instances of that store type (e.g. Wrapped PST, standard PST, Live Connector, Exchange Store, etc...)
I tried 0x0EA0, but not getting the value in proper format, so this one is not working out for me.
I tried PR_MDB_PROVIDER, but this property failed for some PSTs in outlook 2003.(Works fine with outlook 2007)
Finally i took 0x0E38 an un named property whose value is always 3 for sharepoint PST, for normal PSTs this property can not be found(I'd to consume the exception ;)). Till now this one is working out for me. If any other property is is there Keep Posting pls.
What do you mean by "proper format"? Are you getting back an error, or just a data type you don't know how to parse?
I am getting mostly "null" while getting the value from 0x0EA0.
Which member of the union are you looking at?
I am using the below code to get the property value in to an object
object obj = rfolder.get_Fields("http://schemas.microsoft.com/mapi/proptag/0x0E380003");
where rfolder is RDOStore object.
Ah - you never said you were using the object model. I don't know if the object model can handle a CLSID. The intention here was to access the property using MAPI.
So I think,
I can say that for object model I can use the above property(0x0E38) for detecting Sharepoint PSTs?
That property is PidTagReplFlags, documented in [MS-PST]. I wouldn't assume that a value of 3 can only be set on Sharepoint PSTs.
Is it safe to assume property which you have mentioned(0x0EA0) as a flag for Sharepoint PST. Because I can't find the reference of this property anywhere(even in [MS-PST])
I don't even see PR_ASSOCIATED_SHARING_PROVIDER in the IMsgStore object for my SharePoint Lists store using OutlookSpy...
Eric - did you request it?
I don't understand this. Is this property not accessible by Outlook Spy itself? Or some work around is there to access this property?
>Is this property not accessible by Outlook Spy itself?
Never said that - I asked if he asked Outlook Spy to go get the prop. I don't use the tool myself, but from screen shots I'd try the "Add Property" button.
Now I am using the below code for filtering out Sharepoint PSTs
For Outlook 2007
For Outlook 2003
Get the file path from MAPIFolder.StoreId(http://www.outlookcode.com/codedetail.aspx?id=1434)
and apply the above filter on the file path.
I tried PSTs generated with different locale settings(Japancese, Korean, etc.) and this code is working out well.
By default sharepoint pst file is generated in English.