有没有办法在 Word 2003 或更高版本的 VBA 代码中使用 Unicode 路径/文件名?

发布于 2024-08-23 04:18:25 字数 210 浏览 1 评论 0原文

有没有办法在 Word 2003 或更高版本的 VBA 代码中使用 Unicode 路径/文件名?

看起来 Word 通过其交互式对话支持 Unicode 路径/文件名,但是当我们的 VBA 代码尝试操作通过 Word 属性公开的 Unicode 路径/文件名时,我们会返回带有大量问号的字符串。

我们需要做些什么才能让 Word VBA 在 Unicode 模式下工作吗?

Is there a way to use Unicode paths/filenames in Word 2003 or higher VBA code?

It appears that Word supports Unicode path/filenames via its interactive dialogues, but when our VBA code tries to manipulate Unicode path/filenames exposed via Word properties, we get back strings with lots of question marks.

Is there something we need to do have Word VBA work in a Unicode mode?

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

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

发布评论

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

评论(1

老街孤人 2024-08-30 04:18:25

哦,真是痛苦啊。我一直在使用这个,这非常有帮助。有多种方法可以直接在 VBA 中手动构建此支持。几次搜索发现了类似这个

请注意,这仍然对对话框等没有帮助,因为它们被设置为操作系统的 LocaleID(因此,如果您将操作系统显示语言更改为本地语言,它们应该显示得很好)。

Oh, it's a real pain. I've been using this, which has been very helpful. There are ways to manually build this support directly in VBA. A couple of searches turned up things like this.

Note that this still won't help with the dialogs, etc. as they are set to the LocaleID of the OS (so if you change your OS display language to the local language, they should appear just fine).

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