开发者

Unable to call method: GetVstoObject

All, Cannot

I have created a Word2007 Document Project and I'm trying to retrieve the content controls on the page via the GetVSTOObject method but it can not find the Microsoft.Office.Tools.Word.Extensions library after I have referenced the Microsoft.Office.Tools开发者_StackOverflow社区.Word.v9.dll as suggested on the MSDN site.

I would greatly appreciate any help.

Below is the error message:

'Microsoft.Office.Interop.Word.Document' does not contain a definition for 'GetVstoObject' and no extension method 'GetVstoObject' accepting a first argument of type 'Microsoft.Office.Interop.Word.Document' could be found (are you missing a using directive or an assembly reference?)


Make sure that you add a using statement for the extensions namespace:

using Microsoft.Office.Tools.Word.Extensions;

If you already did this, can you share the code where you are trying to use the extension method?

Edit: As you can see in the image you're using Visual Studio 2008 RTM (Release To Manufacturing) version and you have not installed the Visual Studio SP1. The SP1 mentioned in the right is for the .NET Framework.

About Dialog for Visual Studio http://img337.imageshack.us/img337/9041/vs2008sp1.png

Try installing the SP1 for Visual Studio. You can download it from here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜