Использование Applescript Я пытаюсь извлечь основной текст всех электронных писем из определенной папки в Mac Mail в таблицу Excel. Я могу сделать это в какой-то момент с помощью приведенного ниже кода, но по какой-то причине извлекается не весь основной текст (только текст), он обрезается в критической точке, непосредственно перед или в середине захвата целевого адреса электронной почты, типично !
tell application "Microsoft Excel"
set LinkRemoval to make new workbook
set theSheet to active sheet of LinkRemoval
set formula of range "A1" of theSheet to "Date"
end tell
tell application "Mail"
set theRow to 2
set theAccount to "Exchange"
get account theAccount
set theMessages to messages of mailbox "Inbox/Target Folder" of account "Exchange"
repeat with aMessage in theMessages
my SetMessage(content of aMessage, theRow, theSheet)
set theRow to theRow + 1
end repeat
end tell
on SetMessage(theMessage, theRow, theSheet)
tell application "Microsoft Excel"
set theRange to "A" & theRow
set formula of range theRange of theSheet to theMessage
end tell
end SetMessage
Мне сказали, что извлечение его в файл CSV может помочь, но я не знаю, как это сделать с помощью Applescript ... Может ли кто-нибудь помочь? Я новый язык!
Джон