你可以打开一个Outlook加载项表单或窗口(VSTO) [英] Can you open a form or window in an Outlook Addin (VSTO)

查看:1006
本文介绍了你可以打开一个Outlook加载项表单或窗口(VSTO)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来VSTO编程。我已经创建了Outlook 2007中,监视包含XML的文本文件,它会打开一个文件夹,一个基本的插件,然后将其作为电子邮件,然后删除它们。这一切工作正常。

I am new to VSTO programming. I have created a basic addin for Outlook 2007 that monitors a folder containing XML text files which it opens and then sends them as an email, then deletes them. this all works fine.

我希望用户能够对插件/程序的运行方式配置某些设置,比如,它会监视的文件夹,和其他的东西。这样做的合乎逻辑的方式是建立在插件打开一个Windows窗体(或XAML窗口),使他们能够进入参数菜单项(我也一样)。

I want the user to be able to configure certain settings for the way the addin/program will operate, such as the folder that it will monitor, and other things. The logical way to do this is to create a menu item in the addin (which I have also done) that opens a windows form (or XAML window) that allows them to enter the parameters.

在我的插件我添加了一个新项目的Windows窗体,它的工作,和设计师打开。然而,在我的插件代码,我无法打开窗体。展会()方法通常与表单对象相关联的不可用。

In my addin I added a new item Windows Form, which worked, and the designer opened. However, in my addin code I cannot open the form. The Show() method normally associated with form objects is not available.

这是简单的东西,你不能这样做,还是我只是做了错误的方式?

Is this simply something you cannot do, or am I just doing it the wrong way?

我已阅读有关Outlook窗体区域,但这些似乎被附加到Outlook项目,如新的电子邮件,任务,约会等等......有似乎没有一个方法可以创建一个可以在Outlook的主窗口中打开的窗体区域。

I have read about Outlook form regions, but these seemed to be attached to outlook items such as a new email, task, appointment etc... there doesnt seem to be a way to create a form region that can be opened in the main window of Outlook.

在理想情况下,我想一起去我原来从菜单项打开一个新窗口的方法但如果这个心不是可能,我想听听其他的解决方案。

Ideally, I would like to go with my original method of opening a new window from a menu item, but if this isnt possible I would like to hear other solutions.

谢谢,
就。

推荐答案

对于一个正常的形态,这听起来像你不只是添加System.Windows.Forms的作为参考,
创建对象,然后显示它如。

For a normal form, it sounds like you didn't just add System.Windows.Forms as a reference, create the object then show it eg.

Form myFrm = new frmFlightList();
myFrm.Show();

这应该在VSTO插件工作,因为它以任何其他形式一样。该CMSConnectorControl对象你指的是一种干扰,给他人只是想展示一种形式的一般情况。

This should work in a VSTO addin, as it does in any other form. The CMSConnectorControl object you refer to is a distraction to others for the general case of just wanting to display a form.

这篇关于你可以打开一个Outlook加载项表单或窗口(VSTO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆