apply modified style for multiple documents

G

Guest

I have a folder containing almost 200 Word documents (Word 2003). They all
contain hyperlinks with the usual format, that is, underlined. I need to
reformat the hyperlinks in those 200 documents in a way that they don't
display the underline. I know it can be done by editing the Hyperlink style.
But how can I apply the modified style to the 200 documents? The Organizer
can help me copy style to only one document at a time! Thanks a lot.
 
G

Guest

It made a good start for me; it helped me in other issues. But I couldn't
figure out how to make it replace styles. Thanks anyway.
 
G

Graham Mayor

The relevant code to replace the text in the Hyperlink Style with the base
colour and no underline would be

With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
'**********************
.Text = ""
.Style = "Hyperlink"
.Replacement.Text = ""
.Replacement.Font.Color = wdColorAutomatic
.Replacement.Font.Underline = wdUnderlineNone
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.Execute replace:=wdReplaceAll
End With
End With

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Guest

Thanks. It worked when I put the code in a macro that runs it for a list of
documents in a folder. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top