Suppir 0 Posted May 10, 2010 Hello!I know about _WordDocFindReplace () which does search-replaces in doc-file with instruments of MS Word.But is it possible to do search-replaces with AutoIt regular expressions (StringRegExpReplace) in doc-file?Thanks! Share this post Link to post Share on other sites
Suppir 0 Posted May 10, 2010 (edited) for example, I know how to do replaces with regular expressions in HTML-pages:#include<IE.au3> $oIE = _IECreate($someInternetLink, 0, 0) $oSpans = _IETagNameGetCollection ($oIE, "span") ;~ ConsoleWrite(@extended) For $oSpan In $oSpans $sOutput = StringRegExpReplace($oSpan.innerText, "\s+", " ") _IEPropertySet($oSpan,"innertext", $sOutput) Next $sHTML = _IEDocReadHTML($oIE) $dFile = FileOpen($sPath,2) If $dFile = -1 Then Exit FileWrite($dFile, $sHTML) FileClose($dFile)but how to do the same thing in doc(x) files? Edited May 10, 2010 by Suppir Share this post Link to post Share on other sites