1

I am attempting to capture a screenshot from an application I've connected to with VBA in Excel. I want to take a screenshot and paste it into 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.

0

1 Answer 1

2
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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.