12-01-2011 03:23 PM
When I export a report to powerpoint, it gets scaled down - apparently to fit within the margins needed by the PowerPointTemplate.ppt file which has the NI banner on it. I created a blank PowerPointTemplate.ppt file (and renamed the original) but my reports still get shrunk down to the same size even with the NI banner missing. Is there a way to control the scaling so that my report pages fill most of the page? I can export to Adobe PDF and they fill the page, and I'd really like to be able to do the same with power point.
Thanks
12-05-2011 03:50 PM
Hello Greg_Gran,
I think what you are trying to accomplish can be done by creating a macro to programmatically resize the images in power point. I have attached a link to an article that explains how to create the macro below. Please review the link and post back to let me know ho wit goes!
Create a Simple Macro to Resize and Center Photos on PowerPoint Slides
http://presentationsoft.about.com/od/powerpointadvanced/ss/macro.htm
12-06-2011 11:14 AM
I can indeed do this manually in PowerPoint. However, the macro recorder has been removed from PowerPoint since 2003 so the method mentioned in the article isn't much help to me. I attempted to discover the VBS methods and properties in PPT 2010 to do this, but so far have not been able to find the correct ones.
However, it seems that the best way to do this would be to create the images in powerpoint at the desired size in the beginning, rather that trying to size them twice.
There is a VB Script in the Examples\Documents folder called REPORT_layout_to_Powerpoint.VBS that appers to do exactly what I want. I should be able to tweak the code at around line 100 get the correct picture scaling.
However, when I run it, I keep getting the error "You cannot start PowerPoint with another copy of the template." "Please close the open PowerPoint file."
However, I do not have PowerPoint or any PowerPoint files open.
Any suggestions?
Thanks
Greg
12-06-2011 12:50 PM
I found the source of my error in the example VB Script. I didn't have a path set correctly.
Along with a few other modifications - it works exactly as I wanted.
-Greg
12-06-2011 02:34 PM
Hey Greg,
Would you be willing to post your updated script for future DIAdem users asking the same question?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-06-2011 04:30 PM - edited 12-06-2011 04:31 PM
Certainly,
The scaling changes are around line 100 and will fill out a powerpoint slide with no margins.
I also made some changes to the paths since I relocated the original script and the PPT Template file. I also commented out a few things I wasn't using, changed a few variables, etc. The template file must be present and the folder references must be valid.
It might be a good idea to refer to the original file in the Examples\Documents directory if someone wants to customize it for their own use.