I'm looking for a simple Apple Script to use with Hazel that looks at the Company Name in the summary box of a microsoft word document and then tags the document with the name of the company. I have 22,000 documents to sort from lots of different companies and it would help if I could initially tag each one with the name of the company it relates to. Thanks very much for your help.
December 29, 2019, 5:22am
to help as a start, found a thread with an example of extracting data from a Word .docx:
OK, I think this should do the trick.
Using the source text file, it will
Extract each text block as a "record"
Extract all of the fields from that record
Use those fields to create a RTF file.
Repeat for each text block found.
It should run as is, but you probably will want to set the default paths for the Source and Output folders first.
Please feel free to post any questions, issues, and/or suggestions concerning this macro.
MACRO: Extract …
December 29, 2019, 6:26am
Hi Mark! Welcome to the forum. Generally you probably want to ask Hazel questions on the Hazel forum which you can find at
https://www.noodlesoft.com/forums/ … but since we’re already here…
The bad news is that I don’t know how to do this with AppleScript.
The good news is that I
do know how to do it with a shell script. I wrote one for this which you can find here:
Note that the script does require that you install
tag which can be installed using:
brew install tag
sudo port install tag
The GitHub repo also explains how to set it up with Hazel.
Thank you so very much for your help everybody. Hope you all have a fabulous new year.