Outlook 加载项保存配置的位置,C#

发布于 2024-07-16 00:25:50 字数 130 浏览 4 评论 0原文

我正在使用 VS2008、C# 开发 Outlook 插件。

我正在尝试找出一种方法来允许用户在安装过程中指定一些设置并在加载项中使用它们。

寻找我不必编写使用注册表的方法。

先谢谢啦~

I am developing a add-in for outlook using VS2008, C#.

I am trying to figure out a way to allow user to specify some settings during the installation and use them in the add-in.

seeking ways I don't have to write use registry.

thanks in advance~

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

杯别 2024-07-23 00:25:50

谢谢,

我实际上决定阅读 Outlook 插件注册表以了解安装位置,并在安装过程中将配置文件复制到那里。 到目前为止一切正常:)

Thanks,

I actually decided to read the outlook addins registry for the installed location and have configuration file copied there during installation. so far it works fine :)

染墨丶若流云 2024-07-23 00:25:50

app.config,并确保将其复制到 dll 目录?

app.config, and make sure that it's copied to dll directory?

指尖凝香 2024-07-23 00:25:50

它是一个插件,那么到底是怎样的呢?

app.config,并确保它是
复制到dll目录?

要去帮忙吗?

基本上,您需要创建一个名为 Outlook.exe.config 的文件,并将其与 Outlook.exe 一起放入 Office12 文件夹中 (c:\Program Files\Microsoft Office\Office12)

如果您这样做,它将被加载,这是唯一的潜在问题是它也可用于加载到 Outlook.exe 进程中的任何其他插件。
更好的想法就像OP建议使用复制到targetdir的任意配置文件并从那里读取它。

Its an Addin, so how exactly is

app.config, and make sure that it's
copied to dll directory?

going to help?

Basically you would need to create a file called Outlook.exe.config and put it in the Office12 folder with Outlook.exe (c:\Program Files\Microsoft Office\Office12)

If you do this it will get loaded, the only potential issue is that it is also available to any other addins that are loaded into the outlook.exe process.
A better idea is just as the OP suggested an use an arbitary config file copied to the targetdir and read it from there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文