Another question concerning the use of StoryRanges.
Will I also be able to search in Wordart?
and if not can I change wordart back to plaintext so I can search it?
Marco
Yes, but not using the Find object.
WordArt objects will be in the Shapes or InlineShapes collections (depending
on whether they are floating or inline -- your document might have both).
You can retrieve the WordArt text from the Shape's .AlternativeText
property. You'll have to use text functions -- ie Instr() -- to see if your
word is in there.
Some, but not all, StoryRanges can have Shapes and InlineShapes collections.
I don't know if the .AlternativeText property is valid for all types of
shape.
> Another question concerning the use of StoryRanges.
>
> Will I also be able to search in Wordart?
> and if not can I change wordart back to plaintext so I can search it?
>
> Marco
vonclausowitz@gmail.com - 25 Feb 2006 08:31 GMT
This is what I did:
Dim myShape As Shape
Dim testWordArt As Variant
Dim sTempNaam As String
For Each myShape In ActiveDocument.Shapes
If Left(myShape.Name, 7) = "WordArt" Then
MsgBox myShape.Name
With myShape
.Select
testWordArt = .AlternativeText
If testWordArt = "THIS IS MY TEXT" Then
sTempNaam = "I FOUND YOUR TEXT"
Exit For
End If
End With
End If
Next
Regards
MArco