更新 : 2007 年 11 月
対象 |
---|
このトピックの情報は、指定された Visual Studio Tools for Office プロジェクトおよび Microsoft Office のバージョンにのみ適用されます。 プロジェクトの種類
Microsoft Office のバージョン
詳細については、「アプリケーションおよびプロジェクトの種類別の使用可能な機能」を参照してください。 |
この例では、未保存の連絡先アイテムの親 MAPIFolder を決定します。
使用例
Private Sub ThisAddIn_Startup(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Startup
Dim contact As Outlook.ContactItem = _
Me.Application.CreateItem(Outlook.OlItemType.olContactItem)
Dim folder As Outlook.MAPIFolder = _
TryCast(contact.Parent, Outlook.MAPIFolder)
MessageBox.Show(folder.Name)
End Sub
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Outlook.ContactItem contact =
this.Application.CreateItem
(Outlook.OlItemType.olContactItem)
as Outlook.ContactItem;
Outlook.MAPIFolder folder =
contact.Parent as Outlook.MAPIFolder;
MessageBox.Show(folder.Name);
}