如何打开“另存为” Outlook 中使用 VSTO 的对话框并获取用户输入的文件名

发布于 2024-09-15 05:33:04 字数 212 浏览 3 评论 0原文

我正在为 Outlook 创建 VSTO 加载项。作为此插件的一部分,我需要能够允许用户将网格保存为 CSV 文件。当用户单击网格上的“导出”按钮时,我想弹出“另存为”对话框,允许用户选择文件/输入文件名和位置。当用户单击“确定”时,我需要一种方法让我的加载项再次获得控制权,获取输入的文件位置并使用它来写入我的 CSV。

我已经四处寻找了一段时间,但我就是不知道如何做到这一点。有什么想法吗?

I'm creating a VSTO add-in for Outlook. As part of this add-in, I need to be able to allow the user the save a grid as a CSV file. When the user clicks on the "Export" button on the grid, I want to pop up the "Save as" dialog box, allow the user to select a file/enter a file name and location. When the user clicks ok, I need a way for my add-in to gain control again, get the file location entered and use that to write my CSV into.

I've been looking around for some time now, but I just can't figure out how to do this. Any ideas?

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

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

发布评论

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

评论(1

孤独难免 2024-09-22 05:33:04

使用 SaveFileDialog 就像这里的答案一样:在 C# 应用程序中使用 OpenFileDialog 控件< /a>

Use the SaveFileDialog like in the answer here: Using the OpenFileDialog control in a C# application

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