Apple Script Help

Hello all.

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.
Mark

1 Like

to help as a start, found a thread with an example of extracting data from a Word .docx:

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 via brew install tag
    (or)
  • MacPorts via sudo port install tag

The GitHub repo also explains how to set it up with Hazel.

1 Like

wow, amazing

Thank you so very much for your help everybody. Hope you all have a fabulous new year.
Cheers
Mark