Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
eromiyasimon
Creator II
Creator II

Define area in Dashboard to PPT

hi all im using below query to export dashboard PPT

DashBoard to PPT

sub exportppt

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

objPresentation.SaveAs "D:\QlikView\Exportj.ppt"

PPSlideNo = 1

For i = 0 to activedocument.noofsheets -1

Set PPSlide = objPresentation.Slides.Add(PPSlideNo,12)

ActiveDocument.GetApplication.WaitForIdle

ActiveDocument.ActiveSheet.CopyBitmapToClipboard

PPSlide.Shapes.Paste

PPSlide.Shapes(PPSlide.Shapes.Count).Top = 1

PPSlide.Shapes(PPSlide.Shapes.Count).Left = 1

PPSlide.Shapes(PPSlide.Shapes.Count).Width = 350

PPSlide.Shapes(PPSlide.Shapes.Count).Height = 350

PPSlide.Shapes(PPSlide.Shapes.Count).PictureFormat.CropRight = 20

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

activedocument.nexttab

PPSlideNo = PPSlideNo + 1

NEXT

objPresentation.Save

objPresentation.Close

objPresentation.Quit

End Sub

Using this query im missing out some areas in bottom like below

Kindly help me to define  my area (or) to copy perfectly from dashboard

here's a example crop attached

thank you in advance

7 Replies
adamdavi3s
Master
Master

Is it not just because you're fixing the output size to 350 by 350 and cropping and that is cutting the bottom off?


Can you set .LockAspectRatio = True and resize one size to fit?

vinieme12
Champion III
Champion III

Does your Dashboard fit to your screen 100% or do you have to scroll down?

Fit the dashboard to your screen, that is all you need to do

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

I think that code is just resizing the image not for cropping

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
eromiyasimon
Creator II
Creator II
Author

can you please give exact code and placing location for locking aspect ratio

vinieme12
Champion III
Champion III

ActiveDocument.ActiveSheet.CopyBitmapToClipboard


This will only take a screenshot of what appears on screen , not offscreen

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
eromiyasimon
Creator II
Creator II
Author

sir i have implemented all the things that you mentioned above and still its not working.

thank you

vinieme12
Champion III
Champion III

Are you sure you have no scrollbars on the dashboard to the right???

Delete your old PPT and try

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.