Jump to content

abdulbadii

Members
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral

About abdulbadii

  1. I tried to replace 'the' and 'this' with 'that' by using VB Regex feature on Word upon the applied strings (ie. document) having font size mostly 10 and 18 for titles, but it resulted in entire strings having font size 18, although the regex seems works correctly (I can't read well) Sub Regex_Replace Dim re As Object, match As Object, matches As Object Set re = CreateObject("VBScript.RegExp") With re .Global = True .IgnoreCase = True .Pattern = "(th)(e|is)\b" ActiveDocument.Range.Text = .Replace(ActiveDocument.Range.Text, "$1at") End With End Sub I can't read the document now as it got messed up and screwed with crammed words with font size 18. Any idea, how to solve it? Sincere help would really be appreciated
×
×
  • Create New...