StorageItem.Save Method
Outlook Developer Reference |
Saves the StorageItem.
Version Information
Version Added: Outlook 2007
Syntax
expression.Save
expression A variable that represents a StorageItem object.
Remarks
If the StorageItem has never been saved before, Save saves the item as a hidden item in the Folder on which Folder.GetStorage was called. If the StorageItem has been saved previously and the item has since been changed, Save saves the changes to the item. If the StorageItem has been saved previously and the item has not been changed since then, the Save method does nothing.
For more information on saving solution data to a StorageItem object, see Creating and Saving Data to Solution Storage.
Example
The following code sample in Visual Basic for Applications shows how to use the StorageItem object to store private solution data. It saves the data in a custom property of a StorageItem object in the Inbox folder. The following describes the steps:
- The code sample calls Folder.GetStorage to obtain an existing StorageItem object that has the subject "My Private Storage" in the Inbox; if no StorageItem with that subject already exists, GetStorage creates a StorageItem object with that subject.
- If the StorageItem is newly created, the code sample creates a custom property "Order Number" for the object. Note that "Order Number" is a property of a hidden item in the Inbox.
- The code sample then assigns a value to "Order Number" and saves the StorageItem object.
Visual Basic for Applications |
---|
|
See Also