Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在解决方案中使用ppt幻灯片部署加载项项目,并将其包含在已部署文件夹中_C#_Visual Studio 2012_Office Interop - Fatal编程技术网

C# 在解决方案中使用ppt幻灯片部署加载项项目,并将其包含在已部署文件夹中

C# 在解决方案中使用ppt幻灯片部署加载项项目,并将其包含在已部署文件夹中,c#,visual-studio-2012,office-interop,C#,Visual Studio 2012,Office Interop,我正在尝试使用power point滑入式解决方案exlorer部署我的项目。但是,在生成这些文件后,它会给我一个错误,因为它在bin debug中找不到这个@@ppt文件。我使用构建操作作为内容,并始终作为副本复制到输出目录,但似乎没有任何帮助。还有其他选择吗 下面是我的代码,在部署后,我正在尝试将形状从解决方案资源管理器中保存的ppt复制到当前ppt,因为此ppt没有添加已部署的文件,所以找不到ppt,所以它没有添加形状 PowerPoint.Application ppApp =

我正在尝试使用power point滑入式解决方案exlorer部署我的项目。但是,在生成这些文件后,它会给我一个错误,因为它在bin debug中找不到这个@@ppt文件。我使用构建操作作为内容,并始终作为副本复制到输出目录,但似乎没有任何帮助。还有其他选择吗

下面是我的代码,在部署后,我正在尝试将形状从解决方案资源管理器中保存的ppt复制到当前ppt,因为此ppt没有添加已部署的文件,所以找不到ppt,所以它没有添加形状

   PowerPoint.Application ppApp = Globals.ThisAddIn.Application;

        String programfilesPath = AppDomain.CurrentDomain.BaseDirectory;
        //var filesPath = Directory.GetParent(Directory.GetParent(Directory.GetParent(programfilesPath).ToString()).ToString());
        String fullPath = programfilesPath;

        string pptname = "Moons.ppt";

        String themePresentationPath = fullPath + pptname;
        // PowerPoint.Application ppapp2 = 
        var temporaryPresentation = ppApp.Presentations.Open(themePresentationPath, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
        PowerPoint.SlideRange ppslr = ppApp.ActiveWindow.Selection.SlideRange;
        int countlargest = ppslr.Shapes.Count;
        string shapecount = harveyballs.SelectedItem.Label.ToString();
        int count = Convert.ToInt32(shapecount);
        ppslr.Shapes.SelectAll();
        PowerPoint.ShapeRange ppShR = ppApp.ActiveWindow.Selection.ShapeRange;
        ppShR[count + 1].Copy();
        temporaryPresentation.Close();
        PowerPoint.SlideRange ppslr2 = ppApp.ActiveWindow.Selection.SlideRange;
        ppslr2.Shapes.Paste();
在bin调试中找不到此@@ppt文件


当当前配置设置为“调试”时,调试文件夹用作输出。是否确实在Visual Studio中设置了调试配置?

我正在尝试将解决方案中此@@ppt文件夹中的形状复制到当前打开的powerpoint幻灯片中themePresentationPath字符串包含什么值?D:\Project\PowerPointAddin\u V1.0\PowerPointAddin\u V1.0\bin\Debug\shape.ppt。因此,我名为shape.ppt的ppt包含一些我想打开的形状,并将这些形状复制到我当前使用的powerpoint中。您在最终用户pc或您的开发人员pc上是否有异常?我在最终用户pc上有