Accessing MS WordPad programmatically? lazarus / 21-General ---------------------------------------------------------------------- AgriMensor · 2022-10-04 15:02 Hi! Does anyone have experience of being able to partially automate WordPad, please? I need to look for specific words in the text and then highlight them (by font color and/or by shading). I'm able to do it using the RichMemo component, but need to get inside WordPad now. Thanks to the generosity of other forum contributors, I can now also do it for MS Word. Thanks in advance for any assistance! Steve ---------------------------------------------------------------------- Leledumbo · 2022-10-12 09:54 AFAIK WordPad is not covered by the same automation that MS Office enjoys, but I could be wrong. In the meantime, you can use MouseAndKeyInput package alongside TProcess (as you will need its process ID to bring the window to front so keyboard and mouse actions are applied to it instead of your own app). ---------------------------------------------------------------------- Thaddy · 2022-10-12 16:24 Quote from: Leledumbo on October 12, 2022, 11:54:17 amAFAIK WordPad is not covered by the same automation that MS Office enjoys, Actually it IS and almost complete too: you will need to import the TOM interfaces. I wrote that about ( well exactly ) in 2004 for KOL and separately for plain Delphi. This goes for the simple RE2 up until today's MsFtEdit.dll. There is also an example by me for FPC, but using the Delphi *.tlb importer. RichEdit2 had some small issues which were later corrected.