NameSpace.AddStore method (Outlook)
Adds a Personal Folders (.pst) file to the current profile.
Syntax
expression. AddStore
( _Store_
)
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. |
Remarks
Use the RemoveStore method to remove a .pst that is already added to a profile.
Example
This Microsoft Visual Basic for Applications (VBA) example adds a new Personal Folders (.pst) file to the user's profile.
Sub CreatePST()
Dim myNameSpace As Outlook.NameSpace
Set myNameSpace = Application.GetNamespace("MAPI")
myNameSpace.AddStore "c:\" & myNameSpace.CurrentUser & "\.pst"
End Sub
See also
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.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin