G
Gregg Roberts
Hi,
In PPT 2007 I'm writing a macro to auto-hide or auto-unhide slides in a
LARGE (600+-slides) preso based on tags that the user can manually add to the
Notes page. One tag is special, forcing the macro not to unhide a slide that
otherwise would be unhidden. The macro is turning to be more complicated than
it needs to be. If I knew the best/simplest way to tell that a given Shape is
a Notes page, I could simplify a couple of aspects of it. Currently I'm
checking whether the Shape currently being processed has a textframe, and if
so, checking to see whether the textframe has the exact text of the tag I'm
looking for:
While ShapeIndex <= ShapeCt And Not MainTagFound
If .Shapes(ShapeIndex).HasTextFrame Then
If InStr(1, .Shapes(ShapeIndex).TextFrame.TextRange.Text,
"hide4brownbag45") > 0 Then
MainTagFound = True
End If
End If
ShapeIndex = ShapeIndex + 1
Wend
But this is different from knowing whether the Shape currently being
processed is a Notes page. Theoretically the tag text could appear anywhere
on the slide, which is really a user error I'd like to ignore. Also, I'd like
to be able to auto-insert a certain tag into the Notes page even if it
currently doesn't contain any tags. So I really need the "right"
identification method instead of this kludge.
In PPT 2007 I'm writing a macro to auto-hide or auto-unhide slides in a
LARGE (600+-slides) preso based on tags that the user can manually add to the
Notes page. One tag is special, forcing the macro not to unhide a slide that
otherwise would be unhidden. The macro is turning to be more complicated than
it needs to be. If I knew the best/simplest way to tell that a given Shape is
a Notes page, I could simplify a couple of aspects of it. Currently I'm
checking whether the Shape currently being processed has a textframe, and if
so, checking to see whether the textframe has the exact text of the tag I'm
looking for:
While ShapeIndex <= ShapeCt And Not MainTagFound
If .Shapes(ShapeIndex).HasTextFrame Then
If InStr(1, .Shapes(ShapeIndex).TextFrame.TextRange.Text,
"hide4brownbag45") > 0 Then
MainTagFound = True
End If
End If
ShapeIndex = ShapeIndex + 1
Wend
But this is different from knowing whether the Shape currently being
processed is a Notes page. Theoretically the tag text could appear anywhere
on the slide, which is really a user error I'd like to ignore. Also, I'd like
to be able to auto-insert a certain tag into the Notes page even if it
currently doesn't contain any tags. So I really need the "right"
identification method instead of this kludge.