I want to paste some text in clipboard into Ms Word. I wrote this following code
a:=findWIndow(pchar('OpusApp'),nil);
b:=FindWindowEx(a,0,pchar('_WwF'),nil);
c:=FindWindowEx(b,0,pchar('_WwB'),nil);
d:=FindWindowEx(c,0,pchar('_WwG'),nil);
SendMessage(d,wm_paste,0,0);
and it didn't work.
But i wrote the code below to paste into Wordpad,and it works fine
a:=findwindow(pchar('WordPadClass'),nil);
b:=FindWindowEx(a,0,pchar('RICHEDIT50W'),nil);
SendMessage(b,wm_paste,0,0);
Am I made some mistake in Ms Words' window structure? The structure above is what i got using Winspector.I'm currently using Ms Word 2007.
Does anyone have solution?
Thanks