次の方法で共有


VersionUpgradeEvent.DocumentVersion プロパティ

Microsoft Office InfoPath フォームのバージョン番号を取得します。

名前空間: Microsoft.Office.Interop.InfoPath
アセンブリ: Microsoft.Office.Interop.InfoPath (microsoft.office.interop.infopath.dll 内)

構文

'宣言
<DispIdAttribute(1)> _
ReadOnly Property DocumentVersion As String
'使用
Dim instance As VersionUpgradeEvent
Dim value As String

value = instance.DocumentVersion
[DispIdAttribute(1)] 
string DocumentVersion { get; }

コメント

このプロパティは、OnVersionUpgrade イベントの間にのみ使用できます。

次の例では、VersionUpgradeEventObject オブジェクトの DocumentVersion プロパティを使用して、InfoPath フォームのバージョン番号をメッセージ ボックスに表示しています。

public void OnVersionUpgrade(VersionUpgradeEvent e)
{
 thisXDocument.UI.Alert("The form version: " + e.DocumentVersion + 
  "\nThe form template version: " + e.SolutionVersion);
 e.ReturnStatus = true;   
}

関連項目

参照

VersionUpgradeEvent インターフェイス
VersionUpgradeEvent のメンバ
Microsoft.Office.Interop.InfoPath 名前空間