C# Can';t使用Microsoft.Office.Core-版本12无参考

C# Can';t使用Microsoft.Office.Core-版本12无参考,c#,com,powerpoint,office-interop,C#,Com,Powerpoint,Office Interop,我正在尝试将Powerpoint Interop加载项用于C#Winform程序。这一部分似乎还可以,但名称空间Microsoft.Office.Core(MsoTriState所需)给我带来了问题 我已经在internet上查找了有关这方面的帮助,一致的意见是将COM选项卡中的引用添加到MicrosoftOffice12对象库中。不幸的是,我只有版本15,程序不接受(下面的错误)。我已经设置好了使用参考 安装Office2007的唯一方法是什么?或者有没有办法强迫程序接受版本15?我在VS20

我正在尝试将Powerpoint Interop加载项用于C#Winform程序。这一部分似乎还可以,但名称空间Microsoft.Office.Core(MsoTriState所需)给我带来了问题

我已经在internet上查找了有关这方面的帮助,一致的意见是将COM选项卡中的引用添加到MicrosoftOffice12对象库中。不幸的是,我只有版本15,程序不接受(下面的错误)。我已经设置好了使用参考

安装Office2007的唯一方法是什么?或者有没有办法强迫程序接受版本15?我在VS2010上

Errors: "the type "Microsoft.Office.Core.MsoTriState is defined in an assembly that is not referenced. You must add a reference to assembly 'office, version 12.0.0.0, Culture = neutral, Piblic key tokem = 71e9bce111e9429c'

"cannot convert from 'Microsoft.Office.Core.MsoTriState [xxx.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs]' to 'Microsoft.Office.Core.MsoTriState'    *projectfilepath*
代码:

using Core = Microsoft.Office.Core;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;


        PowerPoint.Presentation file; 
        int slideIndex = 0;

        public PowerpointForm(string path)
        {
            InitializeComponent();
            var app = new PowerPoint.Application();

            var pres = app.Presentations;

            file = pres.Open(path, Core.MsoTriState.msoTrue, Core.MsoTriState.msoTrue, Core.MsoTriState.msoFalse);

        }