Need to get screenshots of powerpoints slides and paste it in excel using vba macro.
Can anyone help in this regard?
Need to get screenshots of powerpoints slides and paste it in excel using vba macro.
Can anyone help in this regard?
?
Sub vbax_62300_paste_PPSlides_as_pix_to_same_sheet() Dim i As Long ActiveSheet.Cells(1).Select With CreateObject("Powerpoint.Application") With .Presentations("MyOpenAndActivePresentationNameHere.pptx") For i = 1 To .Slides.Count .Slides(i).Copy ActiveSheet.Paste ActiveCell.Offset(20).Select Next i End With End With End Sub
PLS DO NOT PM; OPEN A THREAD INSTEAD!!!
1) Posting Code
[CODE]PasteYourCodeHere[/CODE]
(or paste your code, select it, click # button)
2) Uploading File(s)
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.
3) Testing the Codes
always back up your files before testing the codes.
4) Marking the Thread as Solved
from Thread Tools (on the top right corner, above the first message)
If below code is useful please change the thread heading to "Copy powerpoint slide to Excel sheet" or something similar.
Sub gg() Dim pptApp As PowerPoint.Application Set pptApp = New PowerPoint.Application pptApp.Presentations.Open ("d:\presentation1.pptx") 'Note: Change file path. pptApp.ActivePresentation.Slides(1).Copy 'copy slide instead of capture. use your own slide number ActiveSheet.Paste 'paste from clipboard pptApp.Quit End Sub
Last edited by J FelixBosco; 03-20-2018 at 07:39 AM.