Developing innovative approaches to solving real business problems
VSTO: Using C# to Create
Available both in print and electronically at Amazon.
There is nothing so unfulfilling as the repetition of a single task that is more tedious than inspiring. I discovered that, on large projects, my teams were spending a tremendous amount of time every week preparing status reports for our clients, and that at the end of all that effort, from page to page the formats would change, the colors and layouts wouldn't match exactly, and the transfer of data from source systems to the presentation wouldn't be accurate. This needed to change. Staff should spend more time on the content than on the format and creation of the report.
I also took on the responsibility of running our year-end evaluation process one year, and discovered that the "summary slides" that we used for each employee tended to be incomplete, to require people to find and transfer data from other systems, and at the end of the day, the sequence of the slides was by manager, not by staff level, requiring a reorganization of the slides after they had been collected.
All of these tasks can be automated, saving a lot of time and effort, while dramatically improving the quality of the ultimate work product.
As a result of failing to find any books that could help me, and the frustration of only finding incomplete and often incorrect "help" on the internet, I began developing my own set of routines and libraries to facilitate writing this type of code. I then finally decided to compile these into a text that I thought could be useful to any and every developer facing these kinds of challenges.
The book presents a practical, example-based guide to developing programs to generate all types of PowerPoint presentations. It covers the use of templates and themes, inserting shapes, text boxes and bulleted lists onto charts, videos, and handling transitions and animation. Also provided are a set of reusable routines that make the most frequent formatting activities easy.
There are a lot of coding examples in the book, all taken from working programs. They aren't just a reproduction of the documentation of the product from Microsoft. The parameters are discussed, and statements are demonstrated. Also, sample routines that illustrate the use of various commands are also included. Click here to see samples of code that are included in the text.
Working with Slides
Master slides are discussed in detail, including how to create them from scratch, or to simply make use of existing custom layouts and schemes and templates, and what the advantages are to using each. Placeholders and naming are also covered and differentiated from shapes added at run-time. Slide transitions and creating note pages are also discussed.
Shapes are discussed in detail, both at the generic shape level, and at the specific shape-type levels of text boxes, graphics, smart art, lines and the rest. I walk through the creation and special attributes of each, and provide helper methods that make the process of creating and modifying them even simpler. The source for these methods is discussed and provided in the text with the intent that you would take them and modify them to suit your own special needs. Learn how to insert lines, draw shapes, create a graphic chart, bulleted text and more.
Animations and Transitions
Learn how to apply animations, both times and on action, to your slides and shapes on each slide. Cross fade between slides, animate text appearance, make shapes fly in... whatever you need.
Included in the book are thorough discussions of two case studies. They are intended to demonstrate just how applicable this type of development can be.
The first is the generation of an issue report from of a database. It is an extremely common need that virtually every company could take advantage of. Included here for download is the executable and the database from which the issue report is created. I hope you will download them and see what the buzz is all about. DownloadIssue Report.zip , copy the files to the same directory, and run the program. A sample of the output is also included in the download.
The second program is a utility that can be used to learn more about the relationship between the programming interface and PowerPoint itself. It allows you to select a custom layout for a slide, and see it manifest in an actual PowerPoint presentations, side by side, and to see exactly what the types and names are of the shapes on that page. Download Slide Format Display.zip and copy the files to the same directory, and run the program.
Though only described in the text, I have also made available a program that allows you to inspect the shape id, name, and type on any slide of any presentation. A twin program of the Slide Format Display, that allows you to inspect themes, this program tells you what the shapes are in any existing presentation. Download Presentation Inspector.zip and copy the file to any directory to execute.