Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

how to search for WordArt in a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
muyBN - 17 Feb 2007 08:56 GMT
I teach an online computer class and one of the projects I have my students
do is a Word document with, among other features, WordArt. I’m trying to
macro-automate my correcting of the documents and I need to know how to
detect whether a graphic is a piece of WordArt. My thought is that a search
for “^g” then testing for WordArt properties would be the way to do it, but I
don't know how to test for that property. Any suggestions on either how to
search for WordArt, or to determine if a found graphic is WordArt? Thanks in
advance for any assistance.

Signature

Bryan

Helmut Weber - 17 Feb 2007 11:39 GMT
Hi Bryan,

>Any suggestions

if so:
I couldn't find another way for checking
whether an inlineshape is a WordArt picture,
than this:

Sub Test48800()
Dim oShpNrm As Shape          ' normal shape
Dim oShpInl As InlineShape
Dim strTemp As String
For Each oShpNrm In ActiveDocument.Shapes
  If oShpNrm.Type = msoTextEffect Then
     oShpNrm.Select
     MsgBox "WordArt Shape"
  End If
Next
For Each oShpInl In ActiveDocument.InlineShapes
  If oShpInl.Type = wdInlineShapePicture Then
     oShpInl.Select
     On Error Resume Next
     strTemp = ""
     strTemp = oShpInl.TextEffect.Text
     If strTemp <> "" Then
        MsgBox "WordArt Inlineshape"
     End If
  End If
Next
End Sub

With shapes it is easy.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.