I need some assistance with Microsoft Office Templates in visual studio in general.
My problem is that I am working on Visual Studio 2012 which is compatible or say contains templates for Microsoft Office 2010. I want to know is there any way to find out at runtime which version of MS office is installed on system and build it accordingly. That means I want to get rid of changing in .csproj file version 14.0 to 12.0 manually in case I am developing MS office 2007 solutions in Visual Studio 2012. On the similar lines, it would help me if I have MS office 2012 installed on my machine and I can use still use visual studio say 2012 or 2013 in order to work with it.
I need to manually change it here in csproj. please look at DebugInfoExeName where I changed it from 14.0 to 12.0.
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
<ProjectProperties HostName="Excel" HostPackage="{20A848B8-E01F-4801-962E-25DB0FF57389}" OfficeVersion="14.0" VstxVersion="4.0" ApplicationType="Excel" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\***12.0***\Excel\InstallRoot\Path#excel.exe" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
<Host Name="Excel" GeneratedCodeNamespace="SiraExcelAddIn" IconIndex="0">
<HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
</Host>
</FlavorProperties>
</VisualStudio>
I want to get rid of this window however not manually.