Atrax27 Posted November 13, 2020 Posted November 13, 2020 Just started dipping my toes in the outlook UDF created by water and wooltown, thanks guys! I've been experimenting with the different example scripts and in some cases can get things to work but I don't know how to expand functionality very easily. For example, I'm running the _OL_ItemAttachmentSave function and it saves the single test picture without issue. As soon as I move another email into that test environment folder (Outlook-UDF-test) and run the script it ignores the second email with attachment. Really I'm looking to "save all email attachments into a folder" but am stuck at square one. OL_ItemSave doesn't appear to work Neither does OL_ItemAttachmentGet Thank you.
water Posted November 13, 2020 Posted November 13, 2020 The _OL_ItemAttachmentSave.au3 example script searches for mail items in folder "*\Outlook-UDF-Test\SourceFolder\Mail". But it only processes the first mail and saves the attachments. If you need to process all found mail items you have to do it in a loop. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Atrax27 Posted November 13, 2020 Author Posted November 13, 2020 2 minutes ago, water said: The _OL_ItemAttachmentSave.au3 example script searches for mail items in folder "*\Outlook-UDF-Test\SourceFolder\Mail". But it only processes the first mail and saves the attachments. If you need to process all found mail items you have to do it in a loop. I see, thanks. I'll try to figure out how to iteratively loop through, unless you quickly know a method? It looks as though the saving action is hard coded as "attachment2.jpg" on line 17 of OL_ItemAttachmentSave, how would you open it up to save the attachment as-is?
water Posted November 13, 2020 Posted November 13, 2020 You could have a look at _OL_ItemSave to save all attachments to a folder as-is. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Atrax27 Posted November 16, 2020 Author Posted November 16, 2020 OK I have it working (_OL_ItemSave) but its only working on a single email. What is the preferred method to loop through all emails in a particular folder?
water Posted November 16, 2020 Posted November 16, 2020 Use _OL_ItemFind to get an array holding all items of a folder which then can be processed in a loop. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now