@Marlinespike & @RodChristiansen:
Sorry, there is no "save as file format format PDF" command in Word 2004`s and PowerPoint`s AppleScript dictionary ....
You could try to realize it via so called "GUI Scripting"
I really do not like GUI Scripting 😐 ... but i hope this script will work for you:
(You enable GUI Scripting by enabling access for assistive devices in the Universal Access System Preferences panel -- but the first lines in the AppleScript will do this for you too)
this will work with one or more files.
Running it as a Service (as RodChristiansen showed) is a good idea.
on run {input, parameters}
--ENABLE GUI SCRIPTING
tell application "System Events"
if UI elements enabled is false then set UI elements enabled to true
end tell
--RUN THE GUISCRIPT
set pdfSavePath to POSIX path of (choose folder with prompt "Set destination folder")
repeat with x in input
tell application "Microsoft Word"
activate
open x
set theActiveDoc to the active document
tell application "System Events"
tell process "Microsoft Word"
keystroke "p" usingcommand down
repeat until exists window "Print"
end repeat
click menu button "PDF" of window "Print"
repeat until exists menu item "Save as PDF…" of menu 1 of menu button "PDF" of window "Print"
end repeat
click menu item "Save as PDF…" of menu 1 of menu button "PDF" of window "Print"
repeat until exists window "Save"
end repeat
keystroke "g" using {command down, shift down}
set value of text field 1 of sheet of window "Save" to pdfSavePath
click button "Go" of sheet of window "Save"
click button "Save" of window "Save"
end tell
end tell
closetheActiveDoc
end tell
end repeat
return input
end run