返回 UserProperties 集合,代表 Outlook 项目的所有用户属性。
expression.UserProperties
expression 必选。该表达式返回“应用于”列表中的一个对象。
本 VBScript 示例在某个 Boolean 字段设置为 True 时使用 CustomPropertyChange 事件来启用控件。
本示例在窗体的第二页创建了两个自定义字段。第一个字段是名为“RespondBy”的 Boolean 字段。第二个字段名为“DateToRespond”。
Sub Item_CustomPropertyChange(ByVal myPropName)
Select Case myPropName
Case "RespondBy"
Set myPages = Item.GetInspector.ModifiedFormPages
Set myCtrl = myPages("P.2").Controls("DateToRespond")
If Item.UserProperties("RespondBy").Value Then
myCtrl.Enabled = True
myCtrl.Backcolor = 65535 'Yellow
Else
myCtrl.Enabled = False
myCtrl.Backcolor = 0 'Black
End If
Case Else
End Select
End Sub