Sorry, I wrote the script here at the forum actually and didn't test it. You should add
WinWaitActive, ahk_exe OUTLOOK.EXE and it will succeed:
Code: Select all
^NumpadDot::
Clipboard := ""
sendInput, ^{Home}^+{End}
send ^c
Clipwait
WinActivate, ahk_exe OUTLOOK.EXE
WinWaitActive, ahk_exe OUTLOOK.EXE
send ^v
send, {Enter}
return
It is better to use
Clipwait, so you'll be sure that new clipboard data will be pasted later in the Outlook and not old data that was in the Clipboard earlier.
It is better to use
WinWaitActive, ahk_exe OUTLOOK.EXE for you to be sure that Outlook is activated at the moment you're pasting via Ctrl+V.
Not sure emptying the clipboard is necessary.
@alancantor,
Clipboard := "" is neccessary b/c otherwise later
Clipwait won't wait if the clipboard was non-empty already before you launched your hotkey. Clipwait says you that now clipboard is now non-empty and you want new data in it and not old ones.