Copy-Paste issue of smartArt in Powerpoint 2007/2010
I am working on powerpoint 2007/2010 in C++. I need to delete smart art objects of a smart art which is actually copied from original one. I use the following piece of code.
PPT::_SlidePtr pNewSlide=mDummyPresentation->Slides->Ad开发者_高级运维dSlide(1, PPT::ppLayoutBlank);
shp->Copy();
pNewSlide->Shapes->Paste();
PPT::ShapePtr pSmartArt=pNewSlide->Shapes->Item(1);
if(pSmartArt)
{
long int counter = pSmartArt->GroupItems->Count;
for(long int k = 0; k < counter; k++)
{
pSmartArt->GroupItems->Item(1L)->Delete();
}
}
Issue I am facing is that I get count as zero even though the smart art has objects in it. If I code the same thing in VB, I face no issues. Could anyone please through some light on how to resolve the issue?
Thanks in advance, Holla
精彩评论