如何获取PPT当前选中的文本框

图片说明
比如我选中第二个文本框,但我提前并不知道是第二个,所以item,range都不能用,那么我如何得到当前选中的文本框

CString _strbuffer;
CDocumentWindow documentWindow= App.get_ActiveWindow();
CSelection selection= documentWindow.get_Selection();
//CSlideRange  SlideRange= selection.get_SlideRange(); 
//  CShapes shapes = SlideRange.get_Shapes();

CTextRange textrange = selection.get_TextRange();
//  long _count= shapes.get_Count();
//  CShape shape = shapes.Range(COleVariant((short)_count));

//  CTextFrame textframe = shape.get_TextFrame();
//  CTextRange textrange = textframe.get_TextRange();
  AfxMessageBox(textrange.get_Text());
  CFont0 font0 =textrange.get_Font( );
  AfxMessageBox(font0.get_Name());

// CFonts fonts = Presentation.get_Fonts();
// font0 =fonts.Item(COleVariant((short)1));

font0.put_Name(_T("楷体"));
font0.put_NameAscii(_T("楷体"));
font0.put_NameFarEast(_T("楷体"));
AfxMessageBox(font0.get_Name());

1.开始菜单下,编辑栏中点击选择——选择窗格
2.查看选择窗格,点击窗格中的对象名称就可选中对象

https://zhidao.baidu.com/question/364012171181350452.html