我正在使用 Applescript 在 Outlook 中生成电子邮件,并尝试为
content
字段组合两个项目(来自两个不同的变量)。我的项目具有以下格式:
set selectedstring to item myindex of myList -- selected string is "string1"
并且这样使用:
set theEmailText to (selectedstring) & "additional text"
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:"The Subject", content:theEmailText}
open newMessage
get newMessage
end tell
但是当我运行此脚本时,我收到以下错误:
Microsoft Outlook got an error: Can’t make {"string1", "additional text"} into type text.
我需要采取额外的步骤才能将其转换为可用于
content
字段的字符串吗?
将列表强制转换为字符串,如下所示,这有效,感谢 red_menace:
content:theEmailText as string