dimanche 28 septembre 2008

PowerPoint 2003 and Notes

I almost went nuts last Friday, I convert powerpoint to word with a nice vbs script (so I can use it from the command line). It is basically just taking every slide, pasting it into a word file, adding lines for notes. I create a handout with that, it will be printed and handed out to the people attending the presentation.

The command line is so cool, because I can recursively convert all ppt's with a simple for loop:

for /r %i (*.ppt) do convert.vbs %i

Anyway, in the Notes section in powerpoint, we also have text, when we want to include a word/html file into the handout. We must have some 30+ ppts and it failed on just 2. According to google, these two powerpoint slides are the only two on the planet where the notes text is not in NotesPage.Shapes.Placeholders(2) but NotesPage.Shapes.Placeholders(1). The worst is that it is not even consistent, on some slides it is in the correct placeholder and on others it is not ...

I spent quite some time finding out how to determine if a placeholder is a body; the type is returned with PlaceholderFormat.Type and ppPlaceholderBody is the type we are looking for, it is a constant set to 2.


[...]
objSlide = ObjPptApp.ActivePresentation.Slides(slidenbr)
objShapes = objSlide.NotesPage.Shapes

if objShapes.Placeholders(1).PlaceholderFormat.Type= 2 then
NotesText = objShapes.Placeholders(1).TextFrame.TextRange.Text
else
NotesText = objShapes.Placeholders(2).TextFrame.TextRange.Text
end if
[...]

We had been using the script for years, and all presentations are based on a master presentation. I think this must be Office 2007, MS Office for Mac, OpenOffice, or NeoOffice playing silly billy.

I will be happy when we migrate to OpenDocument Format, then we will have all the training sources in a wiki and no need to go through all this hassle with ppt's. Often we get slight modifications in ppt's back ... just imagine if all text and graphics were stored in a wiki. I cannot wait.

Aucun commentaire: