Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 16 Aug 2007 17:58:58 -0500,    group: microsoft.public.word.word6-7macros        back       


Hyperlink Removal Macro   
MS Word 2000 (9.0.3821 SR 1)    Windows XP Home SP 1

I operate a print shop and receive many of my jobs as attachments to Email. 
These are sent to me in MS Word format. When I open the documents any Email 
Addresses and Webpage Links are underlined and in Blue text. Since I don't 
want these colors in my print plate I have to go through the document, line 
by line, and remove all of the color and underlines on the hyperlinks.

I have written a simple Macro to handle this in WordPerfect but don't know 
how to do that in MS Word. In WP I use "Find and Replace" to remove the 
hyperlink codes and replace them with nothing. This works easily with the 
click of an Icon Button.

How can I do that in MS Word? I have no experience writing Macros in MS 
Word.

Thanks for your help.

-- 

Dave
date: Thu, 16 Aug 2007 17:58:58 -0500   author:   Dave leedave at ocleto dot ten

Re: Hyperlink Removal Macro   
This will do it, leaving the plain text of each hyperlink in place of
the clickable link:

Sub HyperlinksToPlainText()
    Dim HL As Hyperlink
    Dim idx As Long
    For idx = ActiveDocument.Hyperlinks.Count To 1 Step -1
        Set HL = ActiveDocument.Hyperlinks(idx)
        HL.Delete
    Next
End Sub

(For some collections you can use a For Each construct, but the
Hyperlinks collection doesn't behave properly and the For Each loop
deletes every other hyperlink, leaving the other half intact.)

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 16 Aug 2007 17:58:58 -0500, "Dave" <leedave at ocleto dot ten>
wrote:

>MS Word 2000 (9.0.3821 SR 1)    Windows XP Home SP 1
>
>I operate a print shop and receive many of my jobs as attachments to Email. 
>These are sent to me in MS Word format. When I open the documents any Email 
>Addresses and Webpage Links are underlined and in Blue text. Since I don't 
>want these colors in my print plate I have to go through the document, line 
>by line, and remove all of the color and underlines on the hyperlinks.
>
>I have written a simple Macro to handle this in WordPerfect but don't know 
>how to do that in MS Word. In WP I use "Find and Replace" to remove the 
>hyperlink codes and replace them with nothing. This works easily with the 
>click of an Icon Button.
>
>How can I do that in MS Word? I have no experience writing Macros in MS 
>Word.
>
>Thanks for your help.
date: Thu, 16 Aug 2007 20:21:11 -0400   author:   Jay Freedman

Re: Hyperlink Removal Macro   
Thank you very much . . . that works perfectly. Now, how do I assign this 
macro to a "Hot Key" or to an Icon on the Toolbar.

As you can tell I'm not very knowledgeable about MS Word. I learned on 
WordPerfect and, at the age of eighty, I find it difficult to learn new 
things.
-----

Dave

"Jay Freedman"  wrote in message 
news:18q9c31lmcj9oc3ia7tsrdtoo8tnl7h4nb@4ax.com...
> This will do it, leaving the plain text of each hyperlink in place of
> the clickable link:
>
> Sub HyperlinksToPlainText()
>    Dim HL As Hyperlink
>    Dim idx As Long
>    For idx = ActiveDocument.Hyperlinks.Count To 1 Step -1
>        Set HL = ActiveDocument.Hyperlinks(idx)
>        HL.Delete
>    Next
> End Sub
>
> (For some collections you can use a For Each construct, but the
> Hyperlinks collection doesn't behave properly and the For Each loop
> deletes every other hyperlink, leaving the other half intact.)
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
>
> On Thu, 16 Aug 2007 17:58:58 -0500, "Dave" <leedave at ocleto dot ten>
> wrote:
>
>>MS Word 2000 (9.0.3821 SR 1)    Windows XP Home SP 1
>>
>>I operate a print shop and receive many of my jobs as attachments to 
>>Email.
>>These are sent to me in MS Word format. When I open the documents any 
>>Email
>>Addresses and Webpage Links are underlined and in Blue text. Since I don't
>>want these colors in my print plate I have to go through the document, 
>>line
>>by line, and remove all of the color and underlines on the hyperlinks.
>>
>>I have written a simple Macro to handle this in WordPerfect but don't know
>>how to do that in MS Word. In WP I use "Find and Replace" to remove the
>>hyperlink codes and replace them with nothing. This works easily with the
>>click of an Icon Button.
>>
>>How can I do that in MS Word? I have no experience writing Macros in MS
>>Word.
>>
>>Thanks for your help.
date: Fri, 17 Aug 2007 08:28:11 -0500   author:   Dave leedave at ocleto dot ten

Re: Hyperlink Removal Macro   
Detailed instructions are in these two articles:
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm

Don't let age slow you down. :-) With 60 just around the corner, I'm having 
trouble just finding time enough to learn all the new stuff that keeps 
popping up.

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.

Dave wrote:
> Thank you very much . . . that works perfectly. Now, how do I assign
> this macro to a "Hot Key" or to an Icon on the Toolbar.
>
> As you can tell I'm not very knowledgeable about MS Word. I learned on
> WordPerfect and, at the age of eighty, I find it difficult to learn
> new things.
> -----
>
> Dave
>
> "Jay Freedman"  wrote in message
> news:18q9c31lmcj9oc3ia7tsrdtoo8tnl7h4nb@4ax.com...
>> This will do it, leaving the plain text of each hyperlink in place of
>> the clickable link:
>>
>> Sub HyperlinksToPlainText()
>>    Dim HL As Hyperlink
>>    Dim idx As Long
>>    For idx = ActiveDocument.Hyperlinks.Count To 1 Step -1
>>        Set HL = ActiveDocument.Hyperlinks(idx)
>>        HL.Delete
>>    Next
>> End Sub
>>
>> (For some collections you can use a For Each construct, but the
>> Hyperlinks collection doesn't behave properly and the For Each loop
>> deletes every other hyperlink, leaving the other half intact.)
>>
>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP        FAQ: http://word.mvps.org
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.
>>
>> On Thu, 16 Aug 2007 17:58:58 -0500, "Dave" <leedave at ocleto dot
>> ten> wrote:
>>
>>> MS Word 2000 (9.0.3821 SR 1)    Windows XP Home SP 1
>>>
>>> I operate a print shop and receive many of my jobs as attachments to
>>> Email.
>>> These are sent to me in MS Word format. When I open the documents
>>> any Email
>>> Addresses and Webpage Links are underlined and in Blue text. Since
>>> I don't want these colors in my print plate I have to go through
>>> the document, line
>>> by line, and remove all of the color and underlines on the
>>> hyperlinks. I have written a simple Macro to handle this in WordPerfect 
>>> but
>>> don't know how to do that in MS Word. In WP I use "Find and
>>> Replace" to remove the hyperlink codes and replace them with
>>> nothing. This works easily with the click of an Icon Button.
>>>
>>> How can I do that in MS Word? I have no experience writing Macros
>>> in MS Word.
>>>
>>> Thanks for your help.
date: Fri, 17 Aug 2007 09:52:22 -0400   author:   Jay Freedman

Re: Hyperlink Removal Macro   
Thank you very much. After I sent my previous message I decided I could 
probably find that answer for myself . . . and did find those sites from a 
Google search.
You are doing a great work for us novices and I am grateful for all those 
who take their time to answer our questions and work out our problems.

Gratefully,

Dave


"Jay Freedman"  wrote in message 
news:%23UeyXXN4HHA.5796@TK2MSFTNGP05.phx.gbl...
> Detailed instructions are in these two articles:
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm
> http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm
>
> Don't let age slow you down. :-) With 60 just around the corner, I'm 
> having trouble just finding time enough to learn all the new stuff that 
> keeps popping up.
>
> -- 
> Regards,
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup 
> so all may benefit.
>
> Dave wrote:
>> Thank you very much . . . that works perfectly. Now, how do I assign
>> this macro to a "Hot Key" or to an Icon on the Toolbar.
>>
>> As you can tell I'm not very knowledgeable about MS Word. I learned on
>> WordPerfect and, at the age of eighty, I find it difficult to learn
>> new things.
>> -----
>>
>> Dave
>>
>> "Jay Freedman"  wrote in message
>> news:18q9c31lmcj9oc3ia7tsrdtoo8tnl7h4nb@4ax.com...
>>> This will do it, leaving the plain text of each hyperlink in place of
>>> the clickable link:
>>>
>>> Sub HyperlinksToPlainText()
>>>    Dim HL As Hyperlink
>>>    Dim idx As Long
>>>    For idx = ActiveDocument.Hyperlinks.Count To 1 Step -1
>>>        Set HL = ActiveDocument.Hyperlinks(idx)
>>>        HL.Delete
>>>    Next
>>> End Sub
>>>
>>> (For some collections you can use a For Each construct, but the
>>> Hyperlinks collection doesn't behave properly and the For Each loop
>>> deletes every other hyperlink, leaving the other half intact.)
>>>
>>> --
>>> Regards,
>>> Jay Freedman
>>> Microsoft Word MVP        FAQ: http://word.mvps.org
>>> Email cannot be acknowledged; please post all follow-ups to the
>>> newsgroup so all may benefit.
>>>
>>> On Thu, 16 Aug 2007 17:58:58 -0500, "Dave" <leedave at ocleto dot
>>> ten> wrote:
>>>
>>>> MS Word 2000 (9.0.3821 SR 1)    Windows XP Home SP 1
>>>>
>>>> I operate a print shop and receive many of my jobs as attachments to
>>>> Email.
>>>> These are sent to me in MS Word format. When I open the documents
>>>> any Email
>>>> Addresses and Webpage Links are underlined and in Blue text. Since
>>>> I don't want these colors in my print plate I have to go through
>>>> the document, line
>>>> by line, and remove all of the color and underlines on the
>>>> hyperlinks. I have written a simple Macro to handle this in WordPerfect 
>>>> but
>>>> don't know how to do that in MS Word. In WP I use "Find and
>>>> Replace" to remove the hyperlink codes and replace them with
>>>> nothing. This works easily with the click of an Icon Button.
>>>>
>>>> How can I do that in MS Word? I have no experience writing Macros
>>>> in MS Word.
>>>>
>>>> Thanks for your help.
>
>
date: Fri, 17 Aug 2007 09:26:00 -0500   author:   Dave leedave at ocleto dot ten

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us