Hi!
I am trying to print all files from a folder, but only the first four are printed. Is there some problems with my code?
tell application "Finder"
set the source_folder to choose folder with prompt ¬
"Pick a folder containing the documents to process:"
set these_files to every file of folder source_folder
end tell
tell application "Microsoft Word"
repeat with doc in these_files
print doc
end repeat
end tell
Ah… solved it. It appears that the printer could not handle too many calls at such a short time so a simple 3 second delay solved my problems.
tell application "Finder"
set the source_folder to choose folder with prompt ¬
"Pick a folder containing the documents to process:"
set these_files to every file of folder source_folder
end tell
repeat with doc in these_files
tell application "Microsoft Word"
print doc
delay 3
end tell
end repeat
I’m baffled that Microsoft Word is able to print a Finder file specifier object directly without the step to open the document.