Hey there,
I’m new to scripting… but I think it can help me on this simple task. I’d like to make a script that will print all word documents in a folder.
I know (sorry to say) that with Windows you can right click and Print… but then still you have to “ok” each one. There must be a way to bypass the “ok” click and just send them all to the print queue. I tried dragging all the files into the queue, but it doesn’t work.
I saw a script in a previous post that works for InDesign, but I’m not sure how to modify it for Word (other than obviously changing the application it references, which doesn’t do the trick):
on open sourceFolders
repeat with sourceFolder in sourceFolders
tell application "Finder"
try
-- If you would like to include subfolders, you say - every file of entire contents of folder…
set idFiles to (every file of folder sourceFolder whose file type is "IDd3") as alias list
on error -- work around bug if there is only one file
set idFiles to (every file of folder sourceFolder whose file type is "IDd3") as alias as list
end try
end tell
if idFiles is not {} then
tell application "InDesign CS"
set user interaction level to never interact
repeat with i from 1 to count of idFiles
open item i of idFiles
tell document 1
tell print preferences
set myPreset to "My Printer Preset" -- name of print style to use
set active printer preset to myPreset
end tell
print without print dialog
close saving no
end tell
end repeat
set user interaction level to interact with all
end tell
end if
return 10 -- try again in 10 seconds
end repeat
end open
I’m very appreciative of any suggestions.
Cheers from Dallas, Texas
Aidan.