WorkbookBase.CustomDocumentProperties プロパティ

定義

ブックのすべてのカスタム ドキュメント プロパティを示す Microsoft.Office.Core.DocumentProperties コレクションを取得します。

public:
 property System::Object ^ CustomDocumentProperties { System::Object ^ get(); };
public object CustomDocumentProperties { get; }
member this.CustomDocumentProperties : obj
Public ReadOnly Property CustomDocumentProperties As Object

プロパティ値

ブックのすべてのカスタム ドキュメント プロパティを表す Microsoft.Office.Core.DocumentProperties コレクション。

次のコード例では、 プロパティを CustomDocumentProperties 使用して、現在のブックのすべてのカスタム ドキュメント プロパティをワークシート Sheet1の列 A に表示します。

この例は、ドキュメント レベルのカスタマイズ用です。

private void DisplayCustomDocumentProperties()
{
    Office.DocumentProperties properties =
        (Office.DocumentProperties)this.CustomDocumentProperties;

    for (int i = 1; i <= properties.Count; i++)
    {
        Globals.Sheet1.Range["A" + i].Value2 =
            properties[i].Name;
    }
}
Private Sub DisplayCustomDocumentProperties()
    Dim properties As Office.DocumentProperties = _
        CType(Me.CustomDocumentProperties, Office.DocumentProperties)

    Dim i As Integer
    For i = 1 To properties.Count
        Globals.Sheet1.Range("A" & i).Value2 = properties(i).Name
    Next i
End Sub

注釈

このプロパティは、カスタム ドキュメント プロパティのコレクション全体を返します。 プロパティの Microsoft.Office.Core.DocumentProperties.Item(System.Object) 名前またはコレクション インデックス (数値) を指定して、コレクション ( Microsoft.Office.Core.DocumentProperties オブジェクト) の 1 つのメンバーを取得するには、 プロパティを使用します。

BuiltinDocumentProperties組み込みのドキュメント プロパティのコレクションを取得するには、 プロパティを使用します。

適用対象