WorkbookBase.ContentTypeProperties プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ブックに保存されているメタデータを記述するプロパティのコレクションを取得します。
public:
property Microsoft::Office::Core::MetaProperties ^ ContentTypeProperties { Microsoft::Office::Core::MetaProperties ^ get(); };
public Microsoft.Office.Core.MetaProperties ContentTypeProperties { get; }
member this.ContentTypeProperties : Microsoft.Office.Core.MetaProperties
Public ReadOnly Property ContentTypeProperties As MetaProperties
プロパティ値
ブックに格納されているメタデータを記述するプロパティを含む Microsoft.Office.Core.MetaProperties コレクション。
例
次のコード例では、現在のブックに関連付けられているメタデータを取得します。 この例では、見つかったメタデータ プロパティの合計数の後に、各プロパティの名前と値を示します。 この例を実行するには、ブックを Microsoft Office SharePoint Server ドキュメント ライブラリに発行し、このブックのカスタム メタデータ プロパティを指定する必要があります。 たとえば、ブックが発行されるドキュメント ライブラリに列を追加できます。 コンテンツ タイプのプロパティの詳細については、Microsoft Office SharePoint Server のドキュメントを参照してください。
この例は、ドキュメント レベルのカスタマイズ用です。
private void GetContentTypeProperties()
{
Office.MetaProperties props = this.ContentTypeProperties;
MessageBox.Show("Number of metadata properties found: "
+ props.Count.ToString());
foreach (Office.MetaProperty prop in props)
{
MessageBox.Show("Metadata property name: " + prop.Name
+ "\r\nMetadata property value: "
+ prop.Value.ToString());
}
}
Private Sub GetContentTypeProperties()
Dim props As Office.MetaProperties = Me.ContentTypeProperties
MessageBox.Show("Number of metadata properties found: " _
+ props.Count.ToString())
For Each prop As Office.MetaProperty In props
MessageBox.Show("Metadata property name: " + prop.Name _
+ vbCrLf + "Metadata property value: " _
+ prop.Value.ToString())
Next
End Sub