Automatically convert/save .docx and .pdf from a pages file

Hey everyone, I run a law firm and am a solo practioner (only attorney) but am adding staff. The problem is that my staff is not all on mac os. To that end, I’d love a way to automatically convert my pages documents to .docx and .pdf for their use.

The complicator is that I use icloud drive as my “server”

Can anyone help me figure out how to use Hazel to do this seamlessly?

I am curious: If you’re “adding staff”, then why not require them to use or provide Macs for them to work on?

set phno to (the clipboard as text)

set pdfpath to “/Users/UserName/Desktop/” & phno & “.pdf”

set NewPDFDoc to EstablishFile(pdfpath)

tell application “Pages”

tell the front document

export it to POSIX file NewPDFDoc as PDF with properties {title:phno}

end tell

end tell

on EstablishFile(myFile)

set posixFile to POSIX path of myFile

try

tell application “System Events”

if (exists file myFile) then

return posixFile

end if

end tell

end try

try

set openFile to open for access myFile with write permission

on error errText

close access file myFile

set openFile to open for access myFile with write permission

end try

close access openFile

return posixFile

end EstablishFile

this script saves the open pages document as .pdf to the desktop while using the clipboard as title (clipboard.pdf)
I am sure you can modify it to your needs.

Rather than switching g out everyone’s hardware and operating system, or duplicating files in different formats, have you considered standardising on a cross platform word processor.

For example, Microsoft Word is perfectly serviceable on Apple devices, and th Office suite can almost alway be found on sale for under 50 USD.

This is a cheap option, with the fewest people impacted, and no risk of out of date multiple version formats resulting.

Good processes beat the convoluted application of technology.