使用 OLE 从 Powerpoint 中获取文本
我正在尝试使用 Win32::OLE 获取幻灯片及其列表当前演示文稿的标题。
到目前为止,我可以获得
my $powerpoint = Win32::OLE->GetActiveObject('Powerpoint.Application')
my $ap = $$powerpoint { ActivePresentation } ;
my $slides = $$ap { slides } ;
But $slides
only has properties Application Count Parent
谁能指出我进一步采取这一行动。
我意识到一个明显的答案是不要使用 Powerpoint。公司指令等等。
I am trying to use Win32::OLE to get a list of slides and their titles from the current presentation.
So far I can get
my $powerpoint = Win32::OLE->GetActiveObject('Powerpoint.Application')
my $ap = $powerpoint { ActivePresentation } ;
my $slides = $ap { slides } ;
But $slides
only has properties Application Count Parent
Can anyone point me to take this futher.
I realise an obvious answer is don't use Powerpoint. Corporate dictat and all that.
另请参阅我对 自动化的回答工作中的工作:将 Powerpoint 项目符号文本导入 Excel 工作表。
PowerPoint 幻灯片没有特定的形状的占位符类型属性可以告诉您它是否是标题:Title
属性。它们有一个Name
属性,但这不是同一回事。输出:
显然,Slide4 上没有标题。
See also my answer to Automating a Job at Work: Importing Powerpoint Bullet Text into an Excel Sheet.
PowerPoint slides do not have a specificA shape's placeholder type property can tell you if it is a title:Title
property. They have aName
property but that is not the same thing.Output:
Obviously, there was no title on Slide4.