2015-06-01 15 views
9

Microsoft Outloook sürüm 15.6'da yeni bir ileti penceresi açmaya çalışıyorum ve ekleri içeren alanları doldurun.Elma eki kullanarak Outlook'ta ekte bir ileti oluşturma

tell application "Microsoft Outlook" 
    set newMessage to make new outgoing message with properties {subject:"Hooray for automation"} 
    make new recipient at newMessage with properties {email address:{name:"Jim Shank", address:"[email protected]"}} 
make new attachment at the end of newMessage with properties {file:"/tmp/Invoice INV2 - Paul.pdf"} 
    open newMessage 
end tell 

(Bu mesaj this stack overflow question türetilmiştir): İşte benim actionscript kod.

Ancak, bu hatayı alıyorum: 256: 398: yürütme hatası: Microsoft Outlook bir hata aldı: Kayıt özelliği değiştirilirken hata oluştu. (-2700)

Outlook'un en son sürümünde yeni bir mesaj açmak için actionscript kullanmak mümkün mü?

+2

Olası yinelenen [nasıl Microsoft Outlook'ta AppleScript ile yeni bir iletiye dosya ekliyorum?] (Http://stackoverflow.com/questions/32052438/how-do-i-attach-a-file-to-a-new-message-in- microsoft-görünüm-ile-AppleScript) – Mogsdad

cevap

1

İşte bir elyazısı olan; belki yardımcı olacak?

tell application "Microsoft Outlook.app" 
activate 
set theFile to "Macintosh HD:Users:Shared:sp.zip" 
set newMessage to make new «class outm» with properties {«class subj»:"Outlook is back"} 
make new «class rcpt» at newMessage with properties {«class emad»:{name:"Mark", «class radd»:"[email protected]"}} 
tell newMessage 
    set theAttachment to make new «class cAtc» with properties {file:theFile} 
    «event mailsend» 
end tell 
end tell