ViewField オブジェクト (Outlook)

ビューで情報の表示に使用されるビュー フィールドを表します。

注釈

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

ビュー フィールドに関連付けられている表示プロパティを表す ColumnFormat オブジェクトにアクセスするには、 ColumnFormat プロパティを使用します。 ビューの XML 定義で参照されるビュー フィールドの名前を取得するには、 ViewXMLSchemaName プロパティを使用します。

次の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 
 

プロパティ

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

関連項目

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

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

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