Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() I am trying to create a macro that will allow me to select all blue text in a document and convert to hidden blue text. Any help would be greatly appreciated. -- Jihrke |
#2
![]() |
|||
|
|||
![]() Jihrke Wrote: I am trying to create a macro that will allow me to select all blue text in a document and convert to hidden blue text. Any help would be greatly appreciated. If you switch on the macro recorder and use the search/replace facility and use the "More" "Format" to choose the relevant color and the same approach to select the replacement value of hidden text then I think it will provide what's required. I tried it and it seems to work fine. -- atropus32 |
#3
![]() |
|||
|
|||
![]() atropus32 Wrote: If you switch on the macro recorder and use the search/replace facility and use the "More" "Format" to choose the relevant color and the same approach to select the replacement value of hidden text then I think it will provide what's required. I tried it and it seems to work fine. I have tried what you suggested, it seems like everything works when I record the macro but when I try to execute it, nothing happens. Here is the macro that it creates, I dont see where it tells it to replace the text as hidden... Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Thanks again for your help. -- Jihrke |
#4
![]() |
|||
|
|||
![]() For anyone who runs across the same problem in the future, I did find an article that explains what was happening, the macro recorder doesnt include the code to change the font. After manually adding the lines of code to change the font, this is the final product.... Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "" .Font.Color = wdColorBlue .Replacement.Font.Hidden = True .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll -- Jihrke |
#5
![]() |
|||
|
|||
![]()
For the benefit of others having similar problems, I imagine the article you
found was http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Jihrke" wrote in message ... For anyone who runs across the same problem in the future, I did find an article that explains what was happening, the macro recorder doesnt include the code to change the font. After manually adding the lines of code to change the font, this is the final product.... Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find Text = "" Replacement.Text = "" Font.Color = wdColorBlue Replacement.Font.Hidden = True Forward = True Wrap = wdFindContinue Format = True MatchCase = False MatchWholeWord = False MatchWildcards = False MatchSoundsLike = False MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll -- Jihrke |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting multiple lines of text | Microsoft Word Help | |||
How can I stop Word "selecting" text | New Users | |||
Use macro to find in text box | Microsoft Word Help | |||
End/FootNote text style | Page Layout | |||
Can autocomplete insert unformatted text into a document? | Microsoft Word Help |