Поделиться через


_Inspector.SetControlItemProperty Method

Binds a built-in property or custom property to a control in an inspector.

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

Syntax

'Declaration
<DispIdAttribute()> _
Sub SetControlItemProperty ( _
    Control As Object, _
    PropertyName As String _
)
'Usage
Dim instance As _Inspector
Dim Control As Object
Dim PropertyName As String

instance.SetControlItemProperty(Control, _
    PropertyName)
[DispIdAttribute()]
void SetControlItemProperty(
    Object Control,
    string PropertyName
)

Parameters

  • Control
    Type: System.Object

    The control that will be bound to a property.

  • PropertyName
    Type: System.String

    The name of the property that will be bound to the control.

Remarks

You can use this method to bind an explicit built-in property or a custom property to a control. You must reference the property by its string name, for example, Subject, and not by namespace, for example, https://schemas.microsoft.com/mapi/proptag/0x0037001E.

The PropertyName parameter is not case-sensitive. For example, SetControlItemProperty interprets an argument, CustomerId, to be the same as CustomerID and binds the specified control to the built-in CustomerID property.

You can also use the following line of code myPage.Controls("bar").ItemProperty = "subject" to bind the subject property to a control. However, note that untrusted code using this will trigger a security warning if the property is protected by the object model security guard such as To, and the client computer is running Microsoft Office Outlook 2007 or later but does not have an appropriately set up antivirus software. You can use the SetControlItemProperty method to avoid security warnings with trusted applications. For more information, see Security Behavior of the Outlook Object Model.

See Also

Reference

_Inspector Interface

_Inspector Members

Microsoft.Office.Interop.Outlook Namespace