Powerpoint 2007/2010 中 smartArt 的复制粘贴问题
我正在用 C++ 编写 powerpoint 2007/2010。我需要删除实际上是从原始艺术品复制而来的智能艺术品的智能艺术品。 我使用下面的代码。
PPT::_SlidePtr pNewSlide=mDummyPresentation->Slides->AddSlide(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();
}
}
我面临的问题是,尽管智能艺术中有对象,但我的计数为零。 如果我在 VB 中编写相同的代码,我不会遇到任何问题。 有人可以告诉我如何解决这个问题吗?
提前致谢, 霍拉
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->AddSlide(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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论