I need to develop an application which will has the capability to send emails using C# with visual studio. The app will be able to use templates for mail, and a lot of things, but I have a problem.
I cannot find any Office.Interop references when I try to add them, which is mean I cannot work with Outlook. Office is installed on my computer, but i also try to install the PIA from this link http://www.microsoft.com/en-us/download/details.aspx?id=3508 but it didn't change anything (when I launch the MSI it stops without a word, I don't know if it's part of the problem).
I`m using Visual Studio 2013 Express, in case that might limit the possible answers.
To install the Office 2010 Primary Interop Assemblies, click the Download button, then click Save and select a location for PIARedist.exe on your computer. Run the executable to extract the O2010pia. msi file. Use one of the following installation methods to install O2010pia.
First, Remove 'Microsoft. Office. Interop. Excel' nuget package, and then add reference to 'Microsoft Excel 16.0 Object Library' (right click the project -> 'Add' -> 'Reference' -> search and add 'Microsoft Excel 16.0 Object Library' ).
Look for them under COM when trying to add the references. You should find the reference below, and possibly Microsoft Outlook 15.0 Object Library, if you need that. There are similar libraries for Word, Excel, etc.:
Update: The Object Library should contain the Interop stuff. Try to add this to a source file and see if it can now find what you need:
using Microsoft.Office.Interop.Outlook;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With