Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I created a macro that replaces paragraph marks with a blank. I only want it
to do this for selected text. Problem is, it does it for non-selected text as well. How can I make this macro only perform the replacement for selected text -- Greg in Atlanta |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I almost forgot, this is for Word 2003
-- Greg in Atlanta "Greg In Atl" wrote: I created a macro that replaces paragraph marks with a blank. I only want it to do this for selected text. Problem is, it does it for non-selected text as well. How can I make this macro only perform the replacement for selected text -- Greg in Atlanta |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Greg In Atl,
like this: Sub T5() If Selection.Type = wdSelectionIP Then Exit Sub With Selection.Range.Find .Text = "^p" .Replacement.Text = " " .Execute Replace:=wdReplaceAll End With End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting selected text auto-applies to all text! | Page Layout | |||
Selected Style gets updated from selected text | Page Layout | |||
Macro: Execute for Selected Text Only | Microsoft Word Help | |||
How do I set up a macro to set selected words typeface to Bold? | Microsoft Word Help | |||
Macro to set selected cell padding to table default | Tables |