Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner - Creator II
Partner - Creator II

Export part of sheet with macro

Hi all,

I have a sheet with has several tables. I wrote a macro to copy the whole sheet to powerpoint which works fine:

Sub PL

Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
Set PPSlide = objPresentation.Slides.Add(1,11)

ActiveDocument.Activesheet.CopyBitmapToClipboard
with PPSlide.Shapes.Paste
.Left = -125
.Top = 80
.Width= 990
end with

end sub

The problem is that the sheet is now copying including all the listboxes etc. Could some one please help me how to cut off part of the image (so part of the left side and part of the top side) so it copies all the tables as 1 image but without the listboxes and other things?

Thanks!

Regards,

Paul

1 Reply
m_woolf
Master II
Master II

These lines should crop the image from the left and top. Adjust the numbers as needed.

    objPPT.ActiveWindow.Selection.ShapeRange.PictureFormat.CropLeft = 359.58

    objPPt.ActiveWindow.Selection.ShapeRange.PictureFormat.CropTop = 189.64