Word(Office)自动化 Visual Studio 2013 C++

Word (Office) Automation Visual Studio 2013 C++

我必须制作一个可以操作 Word 文档(编辑、查看、创建)并使用 C++ 和 Visual Studio 2013 的程序。

我在网上搜索了一下,发现 VSTO 仅适用于 Visual Basic 和 C#。

在 Microsoft 站点上有 "How to create an automation project using MFC and a type library" here,但它似乎是为非常旧的 Visual Studio 版本(如 5.0 和 6.0)编写的。当我到达第九步 "Select the Automation tab." 时,我的 Visual Studio.

版本的 ClassWizzard 中似乎没有这样的选项卡

有什么方法可以在 Visual Studio 的较新版本(如 2013)中使用 C++ 执行自动化?

我找到了方法here. Actually I am using the "import" method and it worked for me in console mode(COM method also worked, but it seems to me more complicated), I haven`t tested it for GUI yet. There is not C++ documentation, but can be used Visual Basic API with a bit thinking here