An add-in I've created worked fine in PowerPoint 2003, but gave an error in
PowerPoint 2007, B2TR. The cause appears to be that Find does not return
NOTHING if the search string is not found. Here's the example from Help:
Set txtRng = shp.TextFrame.TextRange
Set foundText = txtRng.Find(FindWhat:="CompanyX")
Do While Not (foundText Is Nothing)
With foundText
.Font.Bold = True
Set foundText = _
txtRng.Find(FindWhat:="CompanyX", _
After:=.Start + .Length - 1)
End With
Loop
I got my code to work by replacing
Do While Not (foundText Is Nothing)
with
Do While Not (foundText = "")
Looks like this is a bug in VBA: when the search text is not found, the
variable is set to "", rather than NOTHING.
Chris
Shyam Pillai - 15 Oct 2006 02:02 GMT
This is a bug in 2007 confirmed.

Signature
Regards,
Shyam Pillai
Animation Carbon
http://www.animationcarbon.com
> An add-in I've created worked fine in PowerPoint 2003, but gave an error
> in
[quoted text clipped - 29 lines]
>
> http://www.microsoft.com/office/community/en-us/default.mspx?mid=5820fa3b-7919-4
4fa-baef-2a55f89495cc&dg=microsoft.public.powerpoint