-
Notifications
You must be signed in to change notification settings - Fork 3
PowerPoint VBA — GetShapes Macro
Nonki Takahashi edited this page Jan 4, 2021
·
7 revisions
Following code is a sample of GetShapes macro for PowerPoint VBA. This macro convert shapes in a PowerPoint slide to shape array for Shapes in Small Basic.
- Create blank presentation with PowerPoint.
- [VIEW] [Macros], enter GetShapes in [Macro name], [Create] and replace code listed below.
- Remove shapes and text (except left top rectangle sized 21.1 cm x15.1 cm) if exists.
- Draw picture with shapes (and textboxes).
- [VIEW] [Macros] [GetShapes] [Run] for each slide.
- Copy generated code in subroutine Shapes_init a sample program SJG122.
- Modify iMax to the number of elements of shape array in SJG122.
- [Run]
- Rectangle, Oval, Isosceles Triangle, Line, Trapezoid, Hexagon, TextBox
- Supported only symmetrical shapes (to flip in Small Basic keeping the shapes).
- Group is not supported. So ungroup before running this macro.
- Border in trapezoid or hexagon may runs off.
- Trapezoid and hexagon are not supported Shapes editor yet.
- GetShapes.bas (GitHub Gist)
- Small Basic: GetShapes VBA: PowerPoint Macro-Enabled Presentation (nonkit/Small Basic Resources)
- ToVBA.sb (this repo)
- Small Basic: Shapes Converter to PowerPoint VBA (TechNet Wiki)
Copyright © 2014-2020 Nonki Takahashi.
This work is licensed under a Creative Commons Attribution 4.0 International License.