Hi - I have a .Net 2.0 Windows Application and I want to open a Visio 2007 document when the user chooses a date from a date picker. Here's my code:
using visio = Microsoft.Office.Interop.Visio;
string docPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + @"F:\EAS\FloorPlan.vsd";
visio.Documents.Open(docPath);
However, when I compile I get the error message, "The type or namespace 'Office' does not exist in the namespace 'Microsoft'"
I've got Office 2007 installed on this machine, and I've installed the Microsoft XP Primary Interop Assemblies for Office 2007. I've added a reference in my VS 2005 project for the Microsoft Visio 12.0 Type Library. When I do this last step, Microsoft.Office.Core shows up under References in the VS Solution Explorer, but it has a yellow triangle with an exclamation point next to it.
What am I missing?
Thanks!