ViewFields オブジェクト (Outlook)

ビュー内の ViewField オブジェクトのコレクションを表します。

注釈

ViewFields コレクションは、ビューに表示する Outlook アイテムのプロパティを表します。 View オブジェクトから派生した次のオブジェクトのビューのフィールドを追加するのには ViewFields コレクションの Add メソッドを使用します。

表形式ビュー、 ViewFields コレクション内の ViewField オブジェクトの順序はテーブル ビューに表示されるフィールドの列の順序と同じです。 View.XML プロパティによって返される文字列を解析するのには、列の順序を取得することを回避です。

次のVisual Basic for Applications (VBA) の例では、現在の TableView オブジェクトの ViewFields コレクションを反復処理し、コレクション内の各 ViewField オブジェクトのラベルと XML スキーマ名を表示します。

Private Sub DisplayTableViewFields() 
 
 Dim objTableView As TableView 
 
 Dim objViewField As ViewField 
 
 Dim strOutput As String 
 
 
 
 If Application.ActiveExplorer.CurrentView.ViewType = _ 
 
 olTableView Then 
 
 
 
 ' Obtain a TableView object reference for the 
 
 ' current table view. 
 
 Set objTableView = _ 
 
 Application.ActiveExplorer.CurrentView 
 
 
 
 ' Iterate through the ViewFields collection for 
 
 ' the table view, obtaining the label and the 
 
 ' XML schema name for each field included in 
 
 ' the view. 
 
 For Each objViewField In objTableView.ViewFields 
 
 With objViewField 
 
 strOutput = strOutput & .ColumnFormat.Label & _ 
 
 " (" & .ViewXMLSchemaName & ")" & vbCrLf 
 
 End With 
 
 Next 
 
 
 
 ' Display a dialog box containing the concatenated 
 
 ' view field information. 
 
 MsgBox strOutput 
 
 End If 
 
End Sub 
 

メソッド

名前
Add
Insert
アイテム
Remove

プロパティ

名前
アプリケーション
クラス
Count
Parent
Session

関連項目

Outlook オブジェクト モデル リファレンス

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

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