Application.GetObjectReference method (Outlook)

Creates a strong or weak object reference for a specified Outlook object.

Syntax

expression. GetObjectReference( _Item_ , _ReferenceType_ )

expression An expression that returns an Application object.

Parameters

Name Required/Optional Data type Description
Item Required Object The object from which to obtain a strong or weak object reference.
ReferenceType Required OlReferenceType The type of object reference.

Return value

An Object that represents a strong or weak object reference for the specified object.

Remarks

This method returns a weak or strong object reference for the object specified in Item.

Note

Outlook can fail to close successfully if an add-in retains strong object references. Always dereference a strong object reference once it is no longer needed by the add-in.

See also

Application Object

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.