Outlook and word reference??
-
When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??
-
When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??
When you want to connect to Outlook, using the add reference in Visual Studio, and point to Microsoft Outlook 11 (which isnt the outlook.exe). If I was at home, I could give you the full details, but I am pretty sure you cannot directly connect to the Outlook executable.
-
When i make a reference to excel it works fine, but when i try to make one to outlook or office i get the following error: "A reference to "'officePath'.Outlook.exe" could not be added. This is not a valid assembly or Com Component. Only components with extensions 'dll' and Com Components can be added. Please make sure the file is accesisble and that it is a valid assembly or com component" I am using Office 2003 professional. Does anyone know how to fix this??
You should install the Visual Studio Tools for the Microsoft Office System, which comes with O2K3 Pro I believe. You can download the Office XP PIAs (primary interop assemblies) which you should use as opposed to making your own. These are verified assemblies that are associated with the COM components and typelibs typically produced by the company that wrote the application that you're interop'ing. The Office XP PIAs can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en[^] and should work in a pinch (since properly-written COM is mostly backward compatible). The Office 2K3 PIAs cannot be downloaded (except through MSDN Subscriptions), but should be on the O2K3 Pro CD.
Microsoft MVP, Visual C# My Articles