我在幻灯片中创建了简单的形状现在我想将这些保存到类别中并显示在自定义任务窗格中
目前我已经跟踪了选定的形状,但不知道如何在自定义任务窗格代码中保存和显示:
//Microsoft.Office.Interop.PowerPoint;
PowerPoint.Slide currentSlide = Globals.ThisAddIn.Application.ActiveWindow.View.Slide;
if (currentSlide != null)
{
var selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
if (selection.ShapeRange != null)
{
var shapecount = selection.ShapeRange.Count;
if (shapecount > 0)
{
for (int i = 1; i <= shapecount; i++)
{
var shape = selection.ShapeRange[i];
//want to save and load shape in Custom task pane for later use.
}
}
}
}
我使用了 Microsoft.Office.Interop.PowerPoint 命名空间,并希望在幻灯片中加载和保存如此形成的形状