Luckily I have a word version from my university. I have pretty much the same setup as you do and the script works fine for me, strange… have you given Hazel the permission to open and operate your mac? Which version of MacOsX and Word are you using? (Here Mojave 10.14.2 and Word 16.20)
Yesterday I tried to come up with a script for Pages thought I had one, but it does not work properly – actually randomly one time it worked, but then it stopped working…
I used this hint: Pages to PDF via AppleScript, but could not get it to work with hazel.
Do you know if I can pass page conditions to your shell script? like Page Size, Numbers etc.? Would love to do it with shell, because it would work in the background and there would be no need of an additional program in the front, but the page-size, numbers and pictures do not get transferred properly…
EDIT: Of course there is another option, if you use Calibre – I simply love this app! This is one script to convert epub, mubi, doc and docx to PDF. You can pass certain conditions to calibre at the end. Full documentation here: calibre-ebook-convert
/Applications/Calibre.app/Contents/MacOS/ebook-convert "$ORIG_FILE" "converted/$(basename "$FULL_PATH" .epub).pdf" --custom-size=7x10,4 --base-font-size=11 --pdf-page-margin-right=50 --pdf-page-margin-left=50 --pdf-page-margin-bottom=70 --pdf-page-margin-top=50 --change-justification="justify" --pdf-footer-template="<p style=text-align:center;font-size:15>_PAGENUM_</p>"