noob342f
03-10-2022, 03:59 PM
Hi there,
I am trying to solve a problem with VBA and fail to solve the task.
I am looking for a VBA script to take screenshots of Range A:N
Screenshots should be taken so that all rows are included without clipping them.
And the maximum number of lines that should be displayed as a screenshot is that the line height does not exceed 150.
And new group goes to new screenshots. Group "Prio 2" should not be part of a screenshot where there is already "Prio 1".
This is a screenshot that shows what I am trying to solve:
2949129491
https://i.ibb.co/gyWq01g/VBA-Result2.png
This is what I have so far:
Set oPPTApp = CreateObject("PowerPoint.Application")
oPPTApp.Visible = True
Set oPPTFile = oPPTApp.Presentations.Open("C:\Users\Me\Desktop\PPfile.pptx")
Set thisRow = Sheet1.Cells(2, 4)
Set thisColumn = Sheet1.Cells(3, 4)
Set rngSource = Sheet1.Range(thisRow & ":" & thisColumn)
rngSource.CopyPicture
With oPPTFile.Slides(1)
oPPTFile.Slides(1).Shapes.PasteSpecial
Can somebody please help me with this :(
P.S. I added my Excel file as attachment. Hope it is available for download.
I am trying to solve a problem with VBA and fail to solve the task.
I am looking for a VBA script to take screenshots of Range A:N
Screenshots should be taken so that all rows are included without clipping them.
And the maximum number of lines that should be displayed as a screenshot is that the line height does not exceed 150.
And new group goes to new screenshots. Group "Prio 2" should not be part of a screenshot where there is already "Prio 1".
This is a screenshot that shows what I am trying to solve:
2949129491
https://i.ibb.co/gyWq01g/VBA-Result2.png
This is what I have so far:
Set oPPTApp = CreateObject("PowerPoint.Application")
oPPTApp.Visible = True
Set oPPTFile = oPPTApp.Presentations.Open("C:\Users\Me\Desktop\PPfile.pptx")
Set thisRow = Sheet1.Cells(2, 4)
Set thisColumn = Sheet1.Cells(3, 4)
Set rngSource = Sheet1.Range(thisRow & ":" & thisColumn)
rngSource.CopyPicture
With oPPTFile.Slides(1)
oPPTFile.Slides(1).Shapes.PasteSpecial
Can somebody please help me with this :(
P.S. I added my Excel file as attachment. Hope it is available for download.