EraseDrawing() not working in PPT2003?

B

Ben

During a slide show, user can use the pen tool to draw on the slide, and the
call to SlideShowView::EraseDrawing() method will remove all the drawings on
the slide. This method works with the PPT versions before PPT2003. However,
in PPT2003, it just do nothing. Has anyone experienced the same problem? Is
there any workaround for this?

Thanks.
 
S

Sonia

It works fine for me if I right click the slide and select "Erase all ink from
slide". I wonder if they changed something in the object model.
 
B

Ben

Do you know which method is invoked when you select "Erase all ink from
slide"? Thanks.
 
B

Ben

Thanks for your work around. I tried it, but the problem is that those new
drawing objects have not been commited to the slide yet, so that
ThisSlide.Shapes(X) does not return any of them.
 
B

Ben

Thanks for your help, Steve. Here is the code:

if (m_nVersion>=11)
{
_Slide slide = m_SlideShowView.GetSlide();
Shapes shapes = slide.GetShapes();
int count = shapes.GetCount();
for (int i=count; i>0; i--)
{
Shape shape = shapes.Item(COleVariant((long)i));
int type = shape.GetType();
if (type == 23) // msoInkComment
{
shape.Delete();
}
}
}
else
{
m_SlideShowView.EraseDrawing();
}

The 'shapes' collection only contains the objects of the original slide,
none of the new drawing object is inside.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top