View Single Post
  #6   Report Post  
Doug Robbins
 
Posts: n/a
Default

Use code such as the following (change "fox" to whatever word it is to which
you want to apply the formatting

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
While .Execute(FindText:="fox", MatchWildcards:=False, Wrap:=wdFindStop,
Forward:=True) = True
Selection.Font.Bold = True
Selection.Font.Color = wdColorRed
Wend
End With

You will see that there is no comparison between the above code and what you
get by using the macro "recorder".

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"TexasBBQ" wrote in message
...
Graham,
Thanks for the response. I wiped the machine, installed XP and a full
version (not trial) of Office 2003, and all my other software. Same
problem,
macro will not run. Let me revise that, the MACRO runs, but does nothing
(the screen races and jumps around the document like it's running). So I
learned it was most likely not a mistake I made in editing that caused the
problem. I have 2 freshly installed winXP machines, one I imported old
macros - they work fine, AND newly macros won't work. The other machine,
I
didn't import the old macros, but the a a newly recorded macro won't work.

I'm creating very simple macros. Search for a specific word in a
document,
and replace it with the same word - but make it BOLD and RED. Very simple
stuff.

Now I'll jump below and answer your questions.

"Graham Mayor" wrote:

How did you import all your old macros?

**** I stored the macros in a document, the opened it on the new machine,
and used Macros/Organize and moved them to Normal.doc. The work great.
Does this machine have the full version of Acrobat 7 installed? If so,
see
http://www.gmayor.com/lose_that_adob...at_toolbar.htm

**** I only have adobe reader version 7 installed.
Not all the search functions are available to the macro recorder. Some
you

would have to create manually.
**** You read above the kind of simple macros I'm creating, is this
functionality available?
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




TexasBBQ wrote:
Problem: Office 2003 60 dya trial was pre-installed on my New
computer. I imported my old macros and they worked great. However,
I created a new macro, and made a mistake, so I went to the editor to
edit, and now the macro won't run, nor will any new macro that I
record. All the old macros still work. I'd generally be classified
as a power user, but I don't typically edit macros, I simply record
simple macros to find and highlight text in documents I'm researching.

Solutions Attempted so far.
1) Deleted all macros, rebooted and started over. Same Result
2) Reimported old macros and tried again. Same Result
3) Uninstalled MS Word, rebooted, reinstalled. Same Result.

Any ideas?