How to load Word Object Library properly in Visual

2019-09-06 10:32发布

问题:

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

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.

Am I doing something wrong?

回答1:

To the top of your module add;

Imports Microsoft.Office.Interop