![]() |
#1
|
|||
|
|||
![]()
Greetings! I simply want to be able to use Regex within a VB script for Word.
Surely someone already has this script already written? No, I don't want to use Word's built-in Find & Replace function including its "Wildcards" feature. Code:
Sub LineCounter() Dim regExp As Object Set regExp = CreateObject("vbscript.regexp") With regExp .Pattern = "(^p^p)" .Global = True Selection.Text = .Replace(Selection.Text, "^p") End With End Sub Help, please! |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Bachelar | Word VBA | 3 | 05-29-2022 07:03 AM |
![]() |
abdan | Word VBA | 3 | 01-18-2019 09:38 PM |
In Find and Replace, can Word stop after each Replace? | wardw | Word | 1 | 06-08-2017 02:47 PM |
![]() |
gasyoun | Word VBA | 9 | 04-12-2013 04:15 PM |
![]() |
paulkaye | Word | 4 | 12-06-2011 11:05 PM |