c# - How to create shape and add that shape into category in custom task pane in powerpoint using office Interop -


i have created simple shape in slide want save these save category , display in custom task pane

currently have tracked selected shape not getting idea how save , show in custom task pane code:

//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)                             {                                 (int = 1; <= shapecount; i++)                                 {                                     var shape = selection.shaperange[i];                                      //want save , load shape in custom task pane  later use.                                 }                             }                         }                      } 

i have used microsoft.office.interop.powerpoint namespace , want load , save formed shape in slide

the powerpoint object model doesn't provide method serializing shapes. can shape property values , store them using xml or json format. so, able add new shape slide , set properties saved values. hope makes sense you!


Comments