SnArF Posted September 17, 2008 Posted September 17, 2008 I`m trying to Find and replace text in a header of a word doc. When i search for a word in the document it worked perfectly, when the text is in the header it won`t work! Pls help CODE#include $search = FileFindFirstFile("*.doc") If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $document = FileFindNextFile($search) If @error Then ExitLoop $oWordApp = _WordCreate("", 0, 0, 0) $oDoc = _WordDocOpen($oWordApp, @ScriptDir & "\" & $document) _WordDocFindReplace($oDoc, "text", "CHANGE") _WordDocClose($oDoc, -1) WEnd FileClose($search) My scripts: _ConsoleWriteLog | _FileArray2D
ndandy Posted September 18, 2008 Posted September 18, 2008 Look at this:http://www.autoitscript.com/forum/index.ph...7&hl=header
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now