Prev: Copy-Pasting row into exact same row on specific other worksheets
Next: Sorting the data in descending order
From: pochtara on 1 Apr 2010 08:46 When using Regular Expression search using VBA script in Excel to search Word document, "-" character in the word document gets skiped (substituted with "" empty character). Here is the string in Word: <DE4.0><SWR4.4.l‑CE6:A> Here is the snipet of VBA code used: With Selector.Find .text = "\<DE?*^13" .Replacement.text = "" .Forward = True .Wrap = wdFindzz .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With While Selector.Find.Execute s = Selector.text Wend The search find the string in the Word and here is the resulting string in the VBA: <DE4.0><SWR4.4.lCE6:A> As you can see the "-" hyphen character is missing in the resulting string and I can't understand why and how to fix it. Can someone help me with this? Thanks Alex |