【发布时间】:2018-09-28 01:49:31
【问题描述】:
我正在尝试从我用 Excel 中的 VBA 连接到的应用程序中捕获屏幕截图。我想截取屏幕截图并将其粘贴到 PowerPoint 中。但是,我希望将每个屏幕截图都放在一张新幻灯片上。
Dim Pptapp As New PowerPoint.Application
Set pres = Pptapp.Presentations.Add
Dim slidev As PowerPoint.Slide
'(take Screenshot, Don't need code help here)
'need help creating new slide
'need help pasting screenshot on new slide
'I want this to be able to loop through the below items
do until (the end of time)
Screenshot
new slide
paste on new slide
loop
Dim Pptapp As New PowerPoint.Application
Set pres = Pptapp.Presentations.Add
Dim slidev As PowerPoint.Slide
PrintTheScreen ' function added else where
Set slidev = pres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank)
slidev.Select
PasteTheScreen ' function added else where
我需要执行.Select 函数以确保幻灯片得到粘贴。
【问题讨论】:
标签: vba excel powerpoint screenshot