Items オブジェクト (Outlook)Items object (Outlook)
フォルダー内のOutlook アイテムオブジェクトのコレクションが含まれています。Contains a collection of Outlook item objects in a folder.
解説Remarks
Folder オブジェクトのitemsオブジェクトを取得するのにには、 items プロパティを使用します。Use the Items property to return the Items object of a Folder object.
1つの Outlook アイテムを取得するのにには、 Items (index) を使用します。_引数 index_には、名前またはインデックス番号を指定します。Use Items (index), where index is the name or index number, to return a single Outlook item.
注意
Items コレクションのインデックスは 1 から始まります。Items コレクション内のアイテムの順序を指定することはできません。The index for the Items collection starts at 1, and the items in the Items collection object are not guaranteed to be in any particular order.
例Example
次の Microsoft Visual Basic for Applications (VBA) の例は、"手伝ってください" という題名を持つ受信トレイ の最初のアイテムを取得します。The following Microsoft Visual Basic for Applications (VBA) example returns the first item in the Inbox with the Subject "Need your advice."
Sub GetItem()
Dim myNameSpace As Outlook.NameSpace
Dim myFolder As Outlook.Folder
Dim myItem As Object
Set myNameSpace = Application.GetNameSpace("MAPI")
Set myFolder = _
myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItem = myFolder.Items("Need your advice")
myItem.Display
End sub
次の VBA の例は、受信トレイの最初のアイテムを取得します。The following VBA example returns the first item in the Inbox. Microsoft Office Outlook 2003 以降では、Items オブジェクトは、オフライン フォルダー ファイル (.ost) 内のアイテムを逆の順番で返します。In Microsoft Office Outlook 2003 or later, the Items object returns the items in an Offline Folders file (.ost) in the reverse order.
Sub GetItem()
Dim myNameSpace As Outlook.NameSpace
Dim myFolder As Outlook.Folder
Dim myItem As Object
Set myNameSpace = Application.GetNameSpace("MAPI")
Set myFolder = _
myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItem = myFolder.Items(1)
myItem.Display
End sub
イベントEvents
名前Name |
---|
ItemAddItemAdd |
ItemChangeItemChange |
ItemRemoveItemRemove |
メソッドMethods
プロパティProperties
名前Name |
---|
アプリケーションApplication |
ClassClass |
CountCount |
IncludeRecurrencesIncludeRecurrences |
ParentParent |
SessionSession |
関連項目See also
Items オブジェクトメンバー Outlook オブジェクトモデルリファレンスItems Object Members Outlook Object Model Reference
サポートとフィードバックSupport and feedback
Office VBA またはこの説明書に関するご質問やフィードバックがありますか?Have questions or feedback about Office VBA or this documentation? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.