I need a special function for a PowerPoint-template. The code needs to be written in Visual Basic for Applications and installed inside PowerPoint. I want the VB code delivered as a text and I will fix the rest.
In the template there is a specific layout (chapter) where there are a 2 textboxes. 1 textbox holds a chapter number and the other holds a chapter title. After the chapter there can be many slides followed by a new chapter with the next number and the next title.
Between the chapters - if the slide holds the same kind of textboxes your program should populate/copy the number and title-text to that slide. Some slides do NOT have these textboxes - so then you should of course not copy the number and title.
Attachments: Capture shows the chapter-slide, capture2 shows an example of another slide which should be numbered and text added
After all the numbering you should create an agenda on the current slide (the user will start your program from an empty slide). The agenda should list all the chapter numbers and chapter texts. The agenda has a specific format (attachment Capture3). If there are more chapters then there is room for on 1 slide your program should create a copy of the current slide and make sure the agenda is on more then 1 slide - as many as needed ( I think 8 for each slide is max)
They must be able to rerun your program and the numbering and agenda then needs to be fixed. This is because they might want to change the order of the chapters.
To sum up: Your program will create numbers and texts on all slides (that are NOT chapter slides) and there is a chapter box. Your program will also (at the same time) create an agenda on 1 or more pages using the design defined by the template.