I want to have Outlook select a specific signature then create a new message with the body content of the signature .
tell application "Microsoft Outlook"
activate
set TheRecipient to the clipboard
set theMessage to make new outgoing message with properties {sender:{name:"Cory Schmaltz", address:"rangeviewmarketing@gmail.com"}, subject:"100 Chiropractor leads!"}
tell theMessage
make new to recipient with properties {email address:{address:TheRecipient}}
tell application "System Events"
tell process "Microsfot Outlook"
tell toolbar of splitter group 1 of window 1 of application process "Outlook"
#click (menu item 4 of "Toolbar" of splitter group 1 of window 1 of application process "Outlook")
#set uiScript to "click UI Element 4 of group \"Toolbar\" of splitter group 1 of window 1 of application process \"Outlook\""
-- Initial
#delay 2.639726
#set timeoutSeconds to 2.0
#set uiScript to "click menu item \"Initial\" of menu 1 of UI Element 4 of group \"Toolbar\" of splitter group 1 of window 1 of application process \"Outlook\""
#delay 2
end tell
end tell
end tell
end tell
end tell
#send theMessage
this is another portion that I tried to get working but I can't seem to get it to select/change:
tell application "Microsoft Outlook" to activate
tell application "System Events"
-- turn on UI automation - may throw a permissions dialog
if UI elements enabled is false then set UI elements enabled to true
click menu item "Preferences..." of menu 1 of menu bar item "Outlook" of menu bar 1 of application process "Outlook"
click item 1 of (buttons of window "Outlook Preferences" of application process "Outlook" whose description is "Signatures")
set timeoutSeconds to 2.0
set timeoutSeconds to 2.0
set uiScript to "click menu item \"Cory Schmaltz (Rangeviewmarketing)\" of menu 1 of pop up button 3 of group 2 of window \"Signatures\" of application process \"Outlook\""
-- Make a selection from the popupbutton.
delay 2.501682
set timeoutSeconds to 2.0
set uiScript to "click pop up button 2 of group 2 of window \"Signatures\" of application process \"Outlook\""
-- Initial
delay 2.907227
set timeoutSeconds to 2.0
set uiScript to "click menu item \"Initial\" of menu 1 of pop up button 2 of group 2 of window \"Signatures\" of application process \"Outlook\"" -- Click the “<fill in title>” button.
delay 2.753081
set timeoutSeconds to 2.0
set uiScript to "click UI Element 6 of window \"Signatures\" of application process \"Outlook\""
-- Click the “<fill in title>” button.
delay 3.181632
set timeoutSeconds to 2.0
set uiScript to "click UI Element 5 of window 1 of application process \"Outlook\""
-- Click the “<fill in title>” button.
delay 1.879827
set timeoutSeconds to 2.0
set uiScript to "click UI Element 19 of window \"Outlook Preferences\" of application process \"Outlook\""
end tell