Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

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

Hi,

Check if this helps

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

Regards

ASHFAQ

7 Replies
Not applicable

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

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
Valued Contributor II

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

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

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

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

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


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




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

Hi,

Check if this helps

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

Regards

ASHFAQ

Not applicable

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

Hi Ashfaq,

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

Regards,

Sneha

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

Welcome

Regards

ASHFAQ