Szerkesztés

Megosztás a következőn keresztül:


NameSpace.AddStoreEx method (Outlook)

Adds a Personal Folders file (.pst) in the specified format to the current profile.

Syntax

expression. AddStoreEx( _Store_ , _Type_ )

expression A variable that represents a NameSpace object.

Parameters

Name Required/Optional Data type Description
Store Required Variant The path of the .pst file to be added to the profile. If the .pst file does not exist, Microsoft Outlook creates it.
Type Required OlStoreType The format in which the data file should be created.

Remarks

Use the olStoreUnicode constant to add a new .pst file that has greater storage capacity for items and folders and supports multilingual Unicode data, to the user's profile. The olStoreANSI constant allows you to create .pst files that don't provide full support for multilingual Unicode data, but are compatible with earlier versions of Outlook. The olStoreDefault constant helps you create a .pst file in the default format that is compatible with the mailbox mode in which Outlook runs on the Microsoft Exchange Server.

Example

This Microsoft Visual Basic for Applications (VBA) example adds a new Personal Folders (.pst) file that has greater storage capacity for items and folders and supports Unicode to the user's profile.

Sub CreateUnicodePST() 
 
 Dim myNameSpace As Outlook.NameSpace 
 
 
 
 Set myNameSpace = Application.GetNamespace("MAPI") 
 
 myNameSpace.AddStoreEx "c:\" & myNameSpace.CurrentUser & "\.pst",olStoreUnicode 
 
End Sub

See also

NameSpace Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.