如何在 Visual Studio Express 中正确加载 Word 对象库

如何在 Visual Studio Express 中正确加载 Word 对象库

问题描述:

我正在尝试在 Visual Studio Express 中为 Visual Basic 加载 Word 对象库,但遇到了一些问题.

I'm trying to load the Word Object Library for Visual Basic in Visual Studio Express but having some trouble.

我转到项目"菜单、添加引用"、COM"并检查 Microsoft Word 14.0 对象库,然后单击确定".但我仍然收到错误Word.application"未定义等.当我输入word"时.没有建议菜单,找不到.

I go to the Project menu, Add Reference, COM and check Microsoft Word 14.0 Object Library and click ok. But I still get the error "Word.application" is not defined etc. And when I type "word." there's no suggestion menu, it's not found.

我做错了什么吗?

在你的模块顶部添加;

Imports Microsoft.Office.Interop