المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : [solved] The type or namespace name 'Word' could not be found [modified]



C# Programming
09-01-2010, 01:12 AM
I'm trying to create a Word automation software using C# over Visual Studio 2010.

I created a new project and added references to "Microsoft Office Object Library 11.0" and "Microsoft Word 11.0 Object Library".

For unapparent reason I get error "error CS0246: The type or namespace name 'Word' could not be found" on the bold line

using Microsoft.Office.Interop;
class Program
{
static void Main(string[] args)
{
Word.Application objWord; // error CS0246 here
Microsoft.Office.Interop.Word.Document objDoc; // no error here
}
}
modified on Tuesday, August 31, 2010 2:53 PM