Due to excessive usage of MS-Office in my military service, I came up with a simple tool for automting about 90% of the tasks related to formating and printing. (Military-Style presentations, mostly in Arabic)
Can be broken into 4 groups
- ready add-in
- This can be copied to MS-PowerPoint default add-in location then added to the toolbar
- Actual Source presentation used for building the add-in in group [1]
- contains source.ppt the source presentation(the code is accompanied with the presentation)
- config.komy.txt, heights.komy, toolbars which are files referenced by the code in source.ppt
- macros folder contains the code exported from source.ppt (just to view the code on github)
- gifs folder contains demo gifs shown in the readme
Numbers in brackets are related to the groups
.
├── [2] config.komy.txt # config file for the tool
├── [4] gifs # demo gifs
├── [2] heights.komy # heights / number of lines data
├── [3] macros # code exported as files
│ ├── class modules # class code files
│ ├── forms # form code files
│ └── modules # plain modules
├── [1] ready add-in # the add-in to be added to MS-Powerpoint
├── [2] source.ppt # source presentation with all exported code included
└── [2] toolbars # toolbar images used by the tool (custom icons)
- Slide Formatting
- Textbox colors (pre-defined set of colors)
- Text colors
- Basic Alignment and arrangement
- Line spacing
- fixing reversed numbers issues
- Detecting parenthesis and coloring text within
- Optimal Alignment and line spacing (most advanced part and saving a lot of time)
What really makes me love this tool isn't only time-saving but the strong algorithmic and mathematical background needed to build those features
- Optimal line spacing
- Looks for the optimal line spacing for textboxes in a slide (they are all the same for visual symmetry) by defining a target padding percentage in a slide and try to minimize an euclidean distance function using ternary search algorithm (which makes it somehow real-time)
- I also modelled the font sizes and number of lines in simple 3D tensor represented in heights.komy which makes searching for fonts and number of lines so efficient and apply only one UI call (not trial and error in the presentation view) [this is because MS-office wraps text so we can only find number of lines in reverse fashion (pre-processing approach)]
- Finding horizontal groups of textboxes in one line
- I used some form of Jaccard index on the y-axis to find intersections (projected onto the y-axis)
- To handle rotations some trigonometry must be involved
This work is dedicated for the Egyptian Army and I believe this helped a lot.