_FormRegionStartup.GetFormRegionStorage Method

Obtains appropriate storage for a form region based on the specified information.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)


<DispIdAttribute()> _
Function GetFormRegionStorage ( _
    FormRegionName As String, _
    Item As Object, _
    LCID As Integer, _
    FormRegionMode As OlFormRegionMode, _
    FormRegionSize As OlFormRegionSize _
) As Object
Dim instance As _FormRegionStartup
Dim FormRegionName As String
Dim Item As Object
Dim LCID As Integer
Dim FormRegionMode As OlFormRegionMode
Dim FormRegionSize As OlFormRegionSize
Dim returnValue As Object

returnValue = instance.GetFormRegionStorage(FormRegionName, _
    Item, LCID, FormRegionMode, FormRegionSize)
Object GetFormRegionStorage(
    string FormRegionName,
    Object Item,
    int LCID,
    OlFormRegionMode FormRegionMode,
    OlFormRegionSize FormRegionSize


  • FormRegionName
    Type: System.String

    The internal name of the form region. This can be indicated by the <name> tag in the corresponding form region XML manifest.

  • Item
    Type: System.Object

    The Outlook item object that caused the loading of the form region.

Return Value

Type: System.Object
A Object representing the storage that Outlook has allocated for the form region. The type of the return value can be: String (string in C#) representing that the return value is a local path to an Outlook Form Storage (.OFS) file; Byte() representing that the return value is an array of bytes that contains the contents of the .OFS file; IStorage representing that the return value is a COM storage object IStorage (for C++ only); Nothing or Null, representing that Outlook could not allocate storage for this form region and will not load the form region.


The add-in must check for the return value of GetFormRegionStorage. A form region will not load if any of the following is true of the returned storage:

  • The returned storage is a .OFS file specified with a non-local path.

  • The returned storage is a file but is not an .OFS file saved from the forms designer.

For examples of add-ins in C# and Visual Basic .NET that implement the FormRegionStartup interface, see code sample downloads on MSDN.

See Also


_FormRegionStartup Interface

_FormRegionStartup Members

Microsoft.Office.Interop.Outlook Namespace