How to load Word Object Library properly in Visual

2019-09-06 10:27发布

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?

enter image description here

1条回答
Anthone
2楼-- · 2019-09-06 11:06

To the top of your module add;

Imports Microsoft.Office.Interop
查看更多
登录 后发表回答