Get Full Range Text to String
问题 I'm writing a script that looks through my outgoing emails and searches for frequent stylistic errors I make. It locates them using regex and then highlights them yellow. Code: Public Sub highlightBadForm() Dim oWordDoc As Object Dim oMatches As Object Dim oRange As Range Dim strText As String Dim lngFindFrom As Long Dim varMtch As Variant Set oWordDoc = Application.ActiveInspector.WordEditor strText = LCase(oWordDoc.Range.Text) lngFindFrom = InStr(strText, "from: ") If lngFindFrom > 0 Then