ItemProperty.IsUserProperty プロパティ (Outlook)

Item プロパティがユーザーによって作成されたカスタム プロパティであるかを示す ブール型 の値を返します。 読み取り専用です。

構文

IsUserProperty

ItemProperty オブジェクトを表す変数。

次の例は、ユーザーが作成したすべてのプロパティの名前を表示します。 サブルーチンDisplayUserPropsItemProperties コレクションを受け入れて検索し、IsUserProperty 値が True のすべての ItemProperty オブジェクトの名前を表示します。 ItemProperties コレクションは 0 から始まります。 つまり、コレクション内の最初のオブジェクトにアクセスするには、インデックス値 0 を使用します。

Sub ItemProperty() 
 'Creates a new mail item and access it's properties 
 Dim objMail As MailItem 
 Dim objitems As ItemProperties 
 
 'Create the mail item 
 Set objMail = Application.CreateItem(olMailItem) 
 'Create a reference to the item properties collection 
 Set objitems = objMail.ItemProperties 
 'Create a reference to the item property page 
 Call DisplayUserProps(objitems) 
End Sub 
 
Sub DisplayUserProps(ByVal objitems As ItemProperties) 
 'Displays the names of all user-created item properties in the collection 
 For i = 0 To objitems.Count - 1 
 'Display name of property if it was created by the user 
 If objitems.Item(i).IsUserProperty = True Then 
 MsgBox "The property " & objitems(i).Name & " was created by the user." 
 End If 
 Next i 
End Sub

関連項目

ItemProperty オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。