如何从 C# WPF 更改 Office 粘贴选项?

发布于 2025-01-16 19:02:25 字数 661 浏览 1 评论 0原文

我正在构建一个程序来从中央界面更改和控制 Windows 和 Office 设置(这比 Microsoft 的东西更容易找到和使用),但我在更改 Office 设置时遇到了障碍。我找到了它们的文档:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.options.pasteformatfromexternalsource

在这一篇中,它列出了以下内容:


public Microsoft.Office.Interop.Word.WdPasteOptions PasteFormatFromExternalSource { get; set; }

但是我该如何做用那个?我不能将它用作变量或方法。我找不到任何显示如何使用它的代码示例。我已经通过 Nuget 安装了 microsoft.office.interop.word。

I'm building a program to change and control Windows and Office settings from a central interface (that's easier to find and use than Microsoft stuff), but I'm hitting a snag in changing Office settings. I've found documentation for them:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.options.pasteformatfromexternalsource

In this one, it lists the following:


public Microsoft.Office.Interop.Word.WdPasteOptions PasteFormatFromExternalSource { get; set; }

But how do I use that? I can't use it as a variable or method. I can't find any code samples that show how to use this. I've already installed microsoft.office.interop.word through Nuget.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文