Re: macro remove hyperlinks while keep text blue



Congratulations! Glad to hear you are successful!

Jack wrote:
Bob,

I finally got it to work!!

There was one step I realized I needed to add to

go to, Format, Styles and Formatting, New Style,
(base it on Normal paragraph font and change it to have Blue text and
name it "Bluetext")


and that was choosing "Character" instead of the default "Paragraph" under Style Type.

Hey, you really hung in there with me as I banged around on this -- I don't think I would have made it without your encouragement -- thanks!


As for the "highlighting", is that the "selected text" highlighting?<


That is the highlighting you get with the Highlight button (chooses a color to highlight around the text that is selected).
So, Replace With/ Format/ Highlight
Of course, the Highlight button needs to have been set to a color.


Well, now I'm going to try and put this into a macro and a button!

:)
Jack

-------------------------------------------


"Bob I" <birelan@xxxxxxxxx> wrote in message news:%2368jF7DcGHA.4604@xxxxxxxxxxxxxxxxxxxxxxx
In the Find/Replace it should locate and change each instance of
"hyperlink" format style to "bluetext" format style. If I have 5
hyperlinks, I get "made 5 replacements", and while the Hyperlinks are
still Blue, the "underline" goes away. As for the "highlighting", is
that the "selected text" highlighting?

Jack wrote:


Bob,

When I do the Bluetext thing, all my text turns blue -- not just the
hyperlink (which is already blue, of course).

However, I can make all the hyperlinks highlighted, and then remove all
hyperlinks. But then that text is highlighted, and there does not appear to
be a command to remove all highlighting. I feel like I'm getting close :)


Jack

-------------------------------------------



"Bob I" <birelan@xxxxxxxxx> wrote in message
news:eEI49Z6bGHA.536@xxxxxxxxxxxxxxxxxxxxxxx
I just did it manually go to, Format, Styles and Formatting, New Style,
(base it on Normal paragraph font and change it to have Blue text and
name it "Bluetext") Then with the "Find/Replace" menu, for Find go to
More, and pick Format, Style, and Hyperlink, and for Replace do the
same thing but pick your "Bluetext" style. Then do Replace All. Then try
your Hyperlink remover.

Jack wrote:



Bob,

Let me have the code and I'll try it!


Jack
-------------------------------------------


"Bob I" <birelan@xxxxxxxxx> wrote in message
news:%23EJTQv3bGHA.3872@xxxxxxxxxxxxxxxxxxxxxxx
I don't know if this will work for 97 but what I did here was to create
a "bluetext" style, and did a find and replace for Format: Style:
Hyperlink, with the "bluetext" style. Then when I did a "delete
hyperlink" the blue text was not removed. Is this an option in 97?

Jack wrote:



Bob,





your Macro seems to select all text?<


Yes.
The remove hyperlink macro is

Public Sub MAIN()
Dim variable
WordBasic.EditSelectAll
UserFunction (variable)
End Sub
Private Sub UserFunction(variable)
WordBasic.SendKeys "^+{F9}"
End Sub

and it selects all text. Therefore, I don't where to include:

Sub MakeTextBlue()
'
' MakeTextBlue Macro
' Macro recorded 05/03/06
'
With Selection.Font

.ColorIndex = wdBlue

End With
End Sub


Jack

----------------------------------------------




"Bob I" <birelan@xxxxxxxxx> wrote in message
news:eKHCMHvbGHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
That's what I thought was happening, but your Macro seems to select all
text?

Jack wrote:





I think the trick is to some how have just all the hyperlinks
highlighted/selected, and then have them converted, and then have them
made blue. Now, the code for that is another thing!

Jack







.


Quantcast