我正在为PowerPoint编写插件,想要在编辑窗口中获取当前幻灯片的文本。以下代码可以实现,但仅当幻灯片在幻灯片选择器窗格中被选中时才能使用。
xSelection := PowerPointApp.ActiveWindow.Selection;
if xSelection.Type = ppSelectionSlides then
begin
xSlide := xSelection.SlideRange.Item(1);
end;
我一直在MSDN上翻阅,试图找到正确的方法来查找当前幻灯片。但是DocumentWindow似乎没有当前幻灯片。