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.

samedi 13 septembre 2008

"The file 'Asms' on Windows XP Professional CD-ROM is needed" Installing Windows XP SP2

I was reinstalling Windows XP on a laptop, and the nightmare began ....

The first message I got was that Windows could not find any hard drive. The computer has a SATA drive, so I disabled NATIVE SATA CONTROL in the bios, restarted and it worked.

Next, after the reboot, I got the apparently famous:

"The file 'Asms' on Windows XP Professional CD-ROM is needed" error message when you install Windows XP

Basically, in the first steps of the installation, when windows setup copies the files, it does not do it recursively (before the first reboot). Bug #1. I understand that since nobody has changed this part of the windows installation in ages, I mean it's the same primitive shit you had in NT3.5. I doubt anybody at microsoft would have the balls to change this.

On microsoft.com and many other places on the web, smart guyz tell you to edit the registry ... scary for many, not for me, however, regedit.exe was not there, regedt32.exe was, but never came up. Expanding either from the cdrom drive did not work either (expanding did, but neither came up, I got a weird error for regedit.exe)... Besides, why? yes WHY??!? would you want to stop setup from accessing files it would normally need for the installation? If they are really "optional" why does setup abort with this error in the first place??? Bug #2.

I looked at the other options ...

Why the cdrom was not available to "setup" but to cmd.exe I do not know, looks like bug #3 to me ;-).

To get to the command prompt anywhere in setup after the reboot is easy, Shift + F10.

So, the easiest solution is to do the following on the command line:
xcopy /s :\i386 :\i386

Regarding microsoft.com knowledge base, the instructions are really weird:
check em out here.

1. Regedit was not there for me, see above, and did not want to run. It did for others, really weird, I am using a standard SP2 disc.
2. xcopy IS there, and works on NTFS formatted drives as well!!!!! So FAT / NTFS distinction is useless!!!
So, the correct answer would have been, for all:
2.1 xcopy /s :\i386 :\i386
/e ??? ... why copy empty folders?
3. Have they ever thought that, maybe, "Method 2" will give exactly the same error? Those guys are brilliant, no really!