Everyone a great god for help what want to do a can change the server address in outlook2003 Settings dongdong
The code below
Winexec (pchar (' C: \ Program Files \ Microsoft Office \ OFFICE11 \ OUTLOOK EXE '), SW_MAXIMIZE);
Sleep (2000);
Form1. Visible:=False;
Winexec (pchar (' C: \ Program Files \ Microsoft Office \ OFFICE11 \ OUTLOOK EXE '), SW_MAXIMIZE);
Biaot:=FindWindow (nil, 'Outlook Today - Microsoft Outlook);
SetWindowText (Biaot, 'is setup, please don't move your mouse and keyboard');
Sleep (2000);
If biaot=0 then
The begin
Biaot:=FindWindow (nil, 'Outlook Today - Microsoft Outlook);
SetWindowText (biaot, 'is setup, please don't move your mouse and keyboard! ');
end;
Keybd_event,0,0,0 (18);
Keybd_event,0,0,0 (84);
Keybd_event,0,0,0 (65);
Keybd_event,0,0,0 (78);
Keybd_event,0,0,0 (9);
Keybd_event,0,0,0 (67);
Keybd_event (KEYEVENTF_KEYUP 18, 0, 0);
//sleep (2000);
Keybd_event,0,0,0 (9);
Keybd_event (KEYEVENTF_KEYUP 18, 0, 0);
Keybd_event,0,0,0 (9);//the TAB key to
//keybd_event,0,0,0 (9);//the TAB key to
KEYEVENTF_KEYUP keybd_event (9, 0, 0).//release the keyboard
Keybd_event (104, 0, 0, 0).
KEYEVENTF_KEYUP keybd_event (104, 0, 0).//output h
Keybd_event (119, 0, 0, 0).
KEYEVENTF_KEYUP keybd_event (119, 0, 0).//output w
Keybd_event (112, 0, 0, 0).
KEYEVENTF_KEYUP keybd_event (112, 0, 0).//output p
Output by this step wrong letter
//form1. Visible:=true;
//Sleep (2000);