这是一些示例代码:
private Outlook.Application applicationObject;
public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)
{
MessageBox.Show("on connection");
applicationObject = (Outlook.Application)application;
applicationObject.Explorers.NewExplorer += new Microsoft.Office.Interop.Outlook.ExplorersEvents_NewExplorerEventHandler(Explorers_NewExplorer);
}
void Explorers_NewExplorer(Microsoft.Office.Interop.Outlook.Explorer Explorer)
{
MessageBox.Show("new explorer");
}
“新资源管理器”消息永远不会出现在屏幕上,因为 NewExplorer 事件永远不会触发,即使我单击“在新窗口中打开”也是如此。
有什么问题?