![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
You are welcome, Robnun! Two remarks if you don't mind: 1) I've deleted one unneeded line in the code in Post 3; 2) I think the following code that uses the Macropod's idea is better for your case:
Code:
Sub FindReplaceAll_2() Dim RngTxt As range Selection.Collapse Direction:=wdCollapseStart Set RngTxt = Selection.range Selection.PasteSpecial DataType:=wdPasteText RngTxt.End = Selection.range.End RngTxt.Select With Selection.Find .ClearFormatting .Replacement.ClearFormatting .text = "[<>#]" .Replacement.text = "-" .Forward = True .Wrap = wdFindStop .MatchWildcards = True .Execute Replace:=wdReplaceAll End With Selection.Copy End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
paste from clipboard to selected paragraphs | yacov | Word VBA | 5 | 02-04-2024 01:41 PM |
![]() |
alex100 | Word VBA | 8 | 11-09-2020 08:19 AM |
Need to copy specific formated text from Word and paste from clipboard into a console application | Userx | Word VBA | 0 | 10-09-2020 05:58 AM |
Error with Clipboard - Getting Spaces Out of Clipboard | StephenRay | Word VBA | 14 | 09-27-2017 01:07 PM |
![]() |
marceepoo | Word VBA | 1 | 09-14-2012 08:20 PM |