用于提取MS Outlook 2016电子邮件并将其保存到Excel的AppleScript
需要帮助了解如何从MS Outlook上的电子邮件中提取内容,并将其保存在MS Excel上。我在下面做了尝试,但我一直在琢磨如何选择要从中提取的收件箱的特定电子邮件文件夹 希望有人能帮忙用于提取MS Outlook 2016电子邮件并将其保存到Excel的AppleScript,excel,outlook,applescript,Excel,Outlook,Applescript,需要帮助了解如何从MS Outlook上的电子邮件中提取内容,并将其保存在MS Excel上。我在下面做了尝试,但我一直在琢磨如何选择要从中提取的收件箱的特定电子邮件文件夹 希望有人能帮忙 tell application "Microsoft Excel" set LinkRemoval to make new workbook set theSheet to active sheet of LinkRemoval set formula of range "D1
tell application "Microsoft Excel"
set LinkRemoval to make new workbook
set theSheet to active sheet of LinkRemoval
set formula of range "D1" of theSheet to "Message"
set formula of range "C1" of theSheet to "Subject"
set formula of range "B1" of theSheet to "From"
set formula of range "A1" of theSheet to "Date"
end tell
tell application "Microsoft Outlook"
activate
set myAccount to exchange account 2
set theMessages to messages of inbox
set theRow to 2
repeat with aMessage in theMessages
my SetDate(date received of aMessage, theRow, theSheet)
my SetFrom(sender of aMessage, theRow, theSheet)
my SetSubject(subject of aMessage, theRow, theSheet)
my SetMessage(content of aMessage, theRow, theSheet)
set theRow to theRow + 1
end repeat
end tell
on SetDate(theDate, theRow, theSheet)
tell application "Microsoft Excel"
set theRange to "A" & theRow
set formula of rangetheRange of theSheet to theDate
end tell
end SetDate
on SetFrom(theSender, theRow, theSheet)
tell application "Microsoft Excel"
set theRange to "B" & theRow
set formula of rangetheRange of theSheet to theSender
end tell
end SetFrom
on SetSubject(theSubject, theRow, theSheet)
tell application "Microsoft Excel"
set theRange to "C" & theRow
set formula of rangetheRange of theSheet to theSubject
end tell
end SetSubject
on SetMessage(theMessage, theRow, theSheet)
tell application "Microsoft Excel"
set theRange to "D" & theRow
set formula of rangetheRange of theSheet to theMessage
end tell
end SetMessage
试试这个
将帐户设置为用户名为“xxxxxxxx”的第一个exchange帐户
set topFolder to mail folder "Inbox" of theAccount
set subFolder to mail folder "xxxxx" of topFolder
set theMessages to messages of subFolder whose time received > xxxxx