Re: export multiple emails as PDF
Re: export multiple emails as PDF
- Subject: Re: export multiple emails as PDF
- From: Deivy Petrescu via AppleScript-Users <email@hidden>
- Date: Wed, 24 Aug 2022 14:33:50 -0400
> On Aug 23, 2022, at 12:17, iKel via AppleScript-Users
> <email@hidden> wrote:
>
> Hello!
> I am trying to automate some of my email processes. I am sure I can do
> some of what I want to do with Smart Folders but does anyone have any good
> scripts for email? The main thing right now I am wanting to do is to select
> or retrieve multiple emails and export as PDF and drop it in a folder or
> maybe a note app like Notion. Is there a way to convert multiple emails to
> PDF? I have a working a script but at the moment I need to figure out how to
> grab a specific sender and perhaps loop over all the emails by that sender
> and then export as a PDF. I am not sure if I am even heading in the right
> direction. If anyone has better solutions feel free to provide them! I
> appreciate it!
>
> tell application "Mail"
> activate
> —iterate over items within the mailbox
> set msgs to item 1 of (get every message of mailbox "INBOX" of account
> "Google" whose sender contains "")
> tell application "System Events"
> tell application process "Mail"
> repeat with msg in msgs
> -- or save as a link
> click menu item "Export as PDF…" of menu "File"
> of menu bar 1
> --place in folder or note app
> end repeat
> end tell
> end tell
> end tell
> _______________________________________________
Hi,
I believe your script will work.
However, I’d suggest you open the message (open msgs) and remove the repeat.
In your code you say item 1 of (), so you will get only one item.
I’d also consider writing :
"set msgs to contents of item 1 of”
I haven’t tried the script yet.
Best, be safe, wear mask, get vaccinated and keep social distance.
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden