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 / November 2007

Tip: Looking for answers? Try searching our database.

VBA to replace marching red ants with yellow highlight?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stir-crazy - 02 Nov 2007 23:44 GMT
Hi all,

I'm exploring VBA for Excel, learning a lot.  But have even further to go
with word.  I'm editing specifications, and to "make it easy" on the person I
need to send these back to, I set the font of all areas I needed input on to  
"Marching Red Ants".

The problem is, is this guy is very old school, and a dinosaur of the days
of ink and paper.  So I now need to print these up and give them to him.  I
have dozens of documents with sporadic modifications done; selecting each
section of Marching Red Ants would be more tedious than when I first put them
there.

Can you point me in the right direction of what the scipt ought to be, or
better yet, post it here?  Thanks!
Jean-Guy Marcil - 03 Nov 2007 03:15 GMT
stir-crazy was telling us:
stir-crazy nous racontait que :

> Hi all,
>
[quoted text clipped - 11 lines]
> Can you point me in the right direction of what the scipt ought to
> be, or better yet, post it here?  Thanks!

Here is a little something to get you going...

'_______________________________________
Dim docSource As Document
Dim docNew As Document
Dim rgeDoc As Range

Set docSource = ActiveDocument
Set docNew = Application.Documents.Add
Set rgeDoc = docNew.Range

With docSource.Range.Find
   .Text = ""
   .Font.Animation = wdAnimationMarchingRedAnts
   Do While .Execute
       rgeDoc.InsertAfter .Parent.Text & vbCrLf
   Loop
End With
'_______________________________________

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Helmut Weber - 03 Nov 2007 11:48 GMT
Hi,

for the highlighting part of your question.

Sub Test8223()
Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
  .Font.Animation = wdAnimationMarchingRedAnts
  While .Execute
     rDcm.HighlightColorIndex = wdYellow
  Wend
End With
End Sub

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

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

stir-crazy - 05 Nov 2007 20:49 GMT
Jean-Guy, Helmut,

Thank you!  This looks great; can't wait to try it out.  I greatly
appreciate the input from you both!

> Hi,
>
[quoted text clipped - 10 lines]
> End With
> End Sub

Rate this thread:






 
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.