R
richardz
Guest
Hello, I try to search and replace text in Word-documents. With the text below, it works to search and replace normal text in the documents, but it doesn't work for text in the page header and page footer of the document. Can somebody help me to let it work for pageheaders? DEFINE VARIABLE chWordApplication AS COM-HANDLE NO-UNDO. CREATE "Word.application" chWordApplication. chWordApplicationocuments:Open("c:\temp\test.docx"). chWordApplication:Selection:find:text = "Old". chWordApplication:Selection:find:replacement:text = "New". chWordApplication:Selection:find:Execute(,,,,,,,,,,2). chWordApplication:ActiveDocument:SaveAs("C:\temp\Test2.docx"). chWordApplication:Quit(). Kind regards, Richard
Continue reading...
Continue reading...