[英]using VBA in Excel to paste into Powerpoint
I am attempting to capture a screenshot from an application I've connected to with VBA in Excel. 我正在尝试从与Excel中的VBA连接的应用程序中捕获屏幕截图。 I want to take a screenshot and paste it into PowerPoint. 我要截屏并将其粘贴到PowerPoint中。 However, I want to have each screen shot on a new slide. 但是,我想让每个屏幕截图都显示在新幻灯片上。
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
I needed to do the .Select
function to make sure the slide was getting the paste. 我需要执行.Select
函数来确保幻灯片正在粘贴。
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
I needed to do the .select function to make sure the slide was getting the paste. 我需要执行.select函数来确保幻灯片正在粘贴。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.