• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to Paste into Outlook 2011 using keystorkes/System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Paste into Outlook 2011 using keystorkes/System Events


  • Subject: Re: How to Paste into Outlook 2011 using keystorkes/System Events
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 25 Feb 2016 17:17:05 +0100


Le 2016/02/25 à 16:21, Dave <email@hidden> a écrit :

Hi All,

I while back I came across a Script that did a Select All and a Paste as below in Outlook but I can’t for the life of me find it!

If someone could tell me the magic formula I’d really appreciate as I can’t seem to get it right. At the time when this snippet runs, the Correct Field in Outlook has been selected:

tell application id "com.microsoft.Outlook"
activate
set myClipboard to the clipboard

set the clipboard to “HELLO WORLD"

tell application "System Events"
keystroke "a" using command down
keystroke "v" using command down
end tell

set the clipboard to myClipboard
end tell


Assuming that the name of the process is "Microsoft Outlook" it may help to use :

tell application id "com.microsoft.Outlook"
activate
set myClipboard to the clipboard


set the clipboard to “HELLO WORLD"


tell application "System Events" to tell process "Microsoft Outlook"
set frontmost to true
keystroke "a" using {command down}
keystroke "v" using {command down}
end tell


set the clipboard to myClipboard
end tell

As you see, I enclosed the modifiers in brackets. I'm not sure that they are required by Outlook.



Yvan KOENIG running El Capitan 10.11.3 in French (VALLAURIS, France) jeudi 25 février 2016 17:17:01



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to Paste into Outlook 2011 using keystorkes/System Events
      • From: Bill Cheeseman <email@hidden>
References: 
 >Kind Of Annoying Droplet Behavior (From: "S. J. Cunningham" <email@hidden>)
 >How to Paste into Outlook 2011 using keystorkes/System Events (From: Dave <email@hidden>)

  • Prev by Date: How to Paste into Outlook 2011 using keystorkes/System Events
  • Next by Date: Re: How to Paste into Outlook 2011 using keystorkes/System Events
  • Previous by thread: How to Paste into Outlook 2011 using keystorkes/System Events
  • Next by thread: Re: How to Paste into Outlook 2011 using keystorkes/System Events
  • Index(es):
    • Date
    • Thread