I want to sent text using sendmessage and wm_paste to another app like notepad or outlook memo-field. this works fine for notepad, but not for outlook or winword. what do i do wrong. I use
1/Memo1.CopyToClipboard;
to send selected text from memo field to clipboard.
2/hWndParent := FindWindow(nil, PChar(sWindow));
to find the window where the text should go. sWindow is f.e.'notepad' or 'new message' for outlook
3/hWndChild := ChildWindowFromPoint(hWndParent, point(50,50));
to get the handle of the window I want to sent text to.
4/SendMessage(hWndChild, WM_PASTE, 1, 0);
to paste the text into the window
Note: I tried using wm_char. Same result as described above
1/Memo1.CopyToClipboard;
to send selected text from memo field to clipboard.
2/hWndParent := FindWindow(nil, PChar(sWindow));
to find the window where the text should go. sWindow is f.e.'notepad' or 'new message' for outlook
3/hWndChild := ChildWindowFromPoint(hWndParent, point(50,50));
to get the handle of the window I want to sent text to.
4/SendMessage(hWndChild, WM_PASTE, 1, 0);
to paste the text into the window
Note: I tried using wm_char. Same result as described above