I am using VBA to paste charts/graphs from Access to PowerPoint. Once pasted, I am resizing them using VBA, but it does not allow me to use inches (even though when I do it manually through the shape Properties, the size values there are in inches).
My question is what unit of measure is the number I use in VBA? I assumed pixels and tried to convert using a 96 pixel per inch factor, but that wasn't just right. Now I'm curious about whether it's based on my screen resolution? I can quickly code it (through trial and error) to look good on my machine, but I worry then if somebody else runs it, and they have a different resolution, the slide will look different. (Note that the graphs are having to fit within other shapes.)
If it's not based on screen resolution, does anybody know the dimensions of a slide in whatever unit it's in?
On the PowerPoint menu, select Preferences, and then select View. Click the arrow next to Ruler units, and select a unit of measure from the list.
Press ALT+F11 to start the VBA editor. Or click the Office button, choose PowerPoint Options, click Popular and put a check next to Show Developer tab in Ribbon. Close the options dialog box, click the Developer tab then click Visual Basic to start the editor.
Using VBA, we can automate the work we do for PowerPoint. But first, to use VBA code or snippets to work in PowerPoint, first work through the security options in PowerPoint to enable all Macros. Then, we can use PowerPoint VBA reference for Macros in MS PowerPoint.
Here's how you can find macros and VBA modules in your document: In Word or Excel, click View > Macro > View Macros. In PowerPoint, click View > Macro.
Units in ppt VBA are Points (a point is about 1/72 of an inch)
Pardon the pedanticism, but an inch is exactly 72 points, at least as far as PowerPoint and pretty much any digital system is concerned.
Before computers took over, "about" did indeed apply. All the more so because there were several different "standard" definitions of the point.
http://en.wikipedia.org/wiki/Point_(typography)
AAMOF, at one ... er ... point, Microsoft redefined the cm (2.4 to the inch instead of 2.54) to suit its own purposes, leading to confusion when people in the metric climes precisely specified measurements in PowerPoint then found out that things didn't print at the expected size.
They fixed this in PPT 2002, but I'd be there are still files floating around that, when opened in current versions of the app, show odd page sizes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With