尝试调用添加的数据存储返回的PropertyAccessor对象的SetProperty方法。例如:
Const PR_DISPLAY_NAME = "http://schemas.microsoft.com/mapi/proptag/0x3001001F"
Dim oStore, oPA
For Each oStore in objNS.Stores
If oStore.FilePath = "C:\Users\pitarr\Documents\Outlook Files\f23.pst" Then
Set oPA = oStore.PropertyAccessor
oPA.SetProperty PR_DISPLAY_NAME, "SomeNewName"
End If
Next
否则,请按照Lankymart的建议,重命名存储的根文件夹是否足够:
Dim oStore, oFolder
For Each oStore in objNS.Stores
If oStore.FilePath = "C:\Users\pitarr\Documents\Outlook Files\f23.pst" Then
Set oFolder = oStore.GetRootFolder()
oFolder.Name = "SomeNewName"
End If
Next
顺便说一句,以上两个示例都未经测试,并且可能取决于所使用的编码。
希望这可以帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句