Platform SDK: CDO 1.2.1 |
The PrivateStore property sets the InfoStore object to be used to access personal views for a container object. Write-only.
objContRend.PrivateStore
Object (InfoStore)
The PrivateStore property represents a messaging user’s default message store, which contains that user’s personal views. The default message store is the InfoStore containing the user’s active Inbox folder.
The PrivateStore property is only needed if you plan to do rendering from a Folders or Messages collection. When needed, PrivateStore should be set as soon as the container renderer is instantiated, and specifically before the DataSource property is set. If PrivateStore is not set at the right time, personal views are not available to the rendering application.
This code fragment determines the user’s default message store from the Session object and sets the PrivateStore property accordingly:
Dim objSess As MAPI.Session Dim objStore As InfoStore Dim strStoreID As String ' ... assume objects are valid ... strStoreID = objSess.Inbox.StoreID Set objStore = objSess.GetInfoStore(strStoreID) Set objContRend.PrivateStore = objStore MsgBox "Your default store is " & objStore.Name