Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
James James is offline
external usenet poster
 
Posts: 113
Default applying macro to a selected text only

Hi

Is there a way to apply a macro to a selected text only, whether the text is
a word, phrase, sentence, or paragraph? The macro is rather simple, a
recorded macro that removes vowels:

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[aeiouAEIOU]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying hidden text when recording a macro jlfetch Microsoft Word Help 1 October 29th 08 10:07 PM
keyboard shortcuts applying to whole doc, not selected text gus Microsoft Word Help 2 June 22nd 07 08:34 AM
Macro only selected text Greg In Atl Microsoft Word Help 2 April 26th 07 08:30 PM
Applying a background colour to styles for selected text only Denise Freiburger Microsoft Word Help 8 September 1st 06 12:45 AM
Macro: Execute for Selected Text Only Pleonasm Microsoft Word Help 4 November 29th 05 10:55 PM


All times are GMT +1. The time now is 01:36 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"