I tried for a couple of hours to insert(replace) a text from a word document(.doc) without results. The function _WordDocFindReplace don't find the text from textboxes. I need an example script, how to find and replace the text from word documents textbox. Thanks
There is a solution for finding and replacing text in textboxes in Word.
_Word_DocFindReplace won't find it directly, but you can select the textboxes through the UDF and then the replace function works.
To select a Word textbox do this:
$WordObject=_Word_Create ()
$WordDocObject=_Word_DocOpen ($WordObject, "test.doc")
$WordObject.ActiveDocument.Shapes($nYourTextBoxNumber).Select
_Word_DocFindReplace($WordDocObject, "FindMe", "ReplaceMe")