Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to export object into power point based on fixed size.

I have written a macro to export object from QlikView to power point.

Is it possible to export the object in a fixed shape (length,width and height) in order to avoid resizing of object in the power point and adjust the length, width and height in the script again. This will save considerable amount of time.

Thank you.

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

7 Replies
Not applicable
Author

Hi Sneha,

Could you share the macro? My team is looking to do similar thing they may be able to address this.

Greatly appreciate it.

Chetan

jerem1234
Specialist II
Specialist II

You can change the size of the chart in qlikview. I'm sure you can change it once you get into powerpoint as well. To change it in qlikview you can use this code as example:

sub Size

'rem double size of all sizable objects on active sheet

dim dummy(0)  'dummy array indicates all parts of frame to be set

Set obj = ActiveDocument.GetSheetObject("CH07")

set fr = obj.GetFrameDef

set pos = fr.Rect

oldWidth = pos.Width

oldHeight = pos.Height

pos.Width = pos.Width * 2

pos.Height = pos.height * 2

obj.SetFrame fr,true,dummy

'code to export chart to ppt here

'now set the height and width back

pos.Width = oldWidth

pos.Height = oldHeight

obj.SetFrame fr,true,dummy

End Sub

Hope this helps!

Not applicable
Author

Hi Jeremiah,

I wish to run the macro and then get a resized image directly in the power point.

Instead of reducing the size in the QlikView, by any chance can i export  a desired object along with a desired shape in power point.

Best Regards,

Sneha

Not applicable
Author


Hi Jeremiah,


I tried to use this piece of code but its not working.


sub Size

'rem double size of all sizable objects on active sheet

dim dummy(0)  'dummy array indicates all parts of frame to be set

Set obj = ActiveDocument.GetSheetObject("CH07")

set fr = obj.GetFrameDef

set pos = fr.Rect

oldWidth = pos.Width

oldHeight = pos.Height

pos.Width = pos.Width * 2

pos.Height = pos.height * 2

obj.SetFrame fr,true,dummy

'code to export chart to ppt here

'now set the height and width back

pos.Width = oldWidth

pos.Height = oldHeight

obj.SetFrame fr,true,dummy

End Sub




ashfaq_haseeb
Champion III
Champion III

Hi,

Check if this helps

http://community.qlik.com/docs/DOC-7249

Regards

ASHFAQ

Not applicable
Author

Hi Ashfaq,

Thanks for the help but the macro as mentioned in the  link doesn't seem to work.

Regards,

Sneha

ashfaq_haseeb
Champion III
Champion III

Welcome

Regards

ASHFAQ