StorageItem Interface


A message object in MAPI that is always saved as a hidden item in the parent folder and stores private data for Outlook solutions.

public interface class StorageItem : Microsoft::Office::Interop::Outlook::_StorageItem
public interface StorageItem : Microsoft.Office.Interop.Outlook._StorageItem
Public Interface StorageItem
Implements _StorageItem


This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _StorageItem.

A StorageItem object is stored at the folder level, allowing it to roam with the account and be available online or offline.

The Outlook object model does not provide any collection object for StorageItem objects. However, you can use GetTable(Object, Object) to obtain a Table with all the hidden items in a Folder, when you specify the TableContents parameter as olHiddenItems. If keeping your data private is of a high concern, you should encrypt the data before storing it.

Once you have obtained a StorageItem object, you can do the following to store solution data:

The default message class for a new StorageItem is IPM.Storage. If the StorageItem existed as a hidden message in a version of Outlook prior to Microsoft Office Outlook 2007, the message class will remain unchanged. In order to prevent modification of the message class, StorageItem does not expose an explicit MessageClass property.

For more information on storing solution data using the StorageItem object, see Storing Data for Solutions



Returns an Application object that represents the parent Outlook application for the object. Read-only.

(Inherited from _StorageItem)

Returns an Attachments object that represents all the attachments for the specified item. Read-only.

(Inherited from _StorageItem)

Returns or sets a String (string in C#) representing the clear-text body of the Outlook item. Read/write.

(Inherited from _StorageItem)

Returns an OlObjectClass constant indicating the object's class. Read-only.

(Inherited from _StorageItem)

Returns a DateTime value that indicates the creation time for the StorageItem. Read-only.

(Inherited from _StorageItem)

Returns and sets a String (string in C#) that represents the solution that created the StorageItem object. Read/write.

(Inherited from _StorageItem)

Returns a String (string in C#) representing the unique Entry ID of the object. Read-only.

(Inherited from _StorageItem)

Returns a DateTime value specifying the date and time that the Outlook item was last modified. Read-only.

(Inherited from _StorageItem)

Returns the parent Object of the specified object. Read-only.

(Inherited from _StorageItem)

Returns a PropertyAccessor object that supports creating, getting, setting, and deleting properties of the parent StorageItem object. Read-only.

(Inherited from _StorageItem)

Returns the NameSpace object for the current session. Read-only.

(Inherited from _StorageItem)

Returns an Integer (int in C#) value indicating the size (in bytes) of the StorageItem. Read-only.

(Inherited from _StorageItem)

Returns or sets a String (string in C#) indicating the subject for the Outlook item. Read/write.

(Inherited from _StorageItem)

Returns the UserProperties collection that represents all the user properties for the Outlook item. Read-only.

(Inherited from _StorageItem)



Permanently removes the StorageItem object from the parent folder.

(Inherited from _StorageItem)

Saves the StorageItem.

(Inherited from _StorageItem)

Applies to