2015-06-01 18 views
9

का उपयोग कर Outlook में अनुलग्नक के साथ एक संदेश बनाएं I Microsoft Outloook संस्करण 15.6 में एक नई संदेश विंडो खोलने और अनुलग्नक सहित फ़ील्ड को पॉप्युलेट करने का प्रयास कर रहा हूं।सेबस्क्रिप्ट

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 

(यह संदेश this stack overflow question से प्राप्त किया गया): यहाँ मेरी actionscript कोड है।

हालांकि, मुझे यह त्रुटि मिलती है: 256: 398: निष्पादन त्रुटि: माइक्रोसॉफ्ट आउटलुक में एक त्रुटि मिली: बदली गई रिकॉर्ड संपत्ति को सहेजते समय त्रुटि। (-2700)

क्या Outlook के नवीनतम संस्करण में एक नया संदेश खोलने के लिए क्रियालेख का उपयोग करना संभव है?

+2

संभावित डुप्लिकेट [कैसे कर मैं ऐप्पलस्क्रिप्ट के माध्यम से माइक्रोसॉफ्ट आउटलुक में एक नए संदेश में एक फाइल संलग्न करता हूं?] (Http://stackoverflow.com/questions/32052438/how-do-i-attach-a-file-to-a-new-message-in- माइक्रोसॉफ्ट-दृष्टिकोण-द्वारा-applescript) – Mogsdad

उत्तर

1

यहां एक सेबस्क्रिप्ट एक है; शायद यह मदद करेगा?

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 
संबंधित मुद्दे