Hello,
I am trying to write an applescript that will print multiple word docs at one time…
I wrote the one below, but it dies on this line:
click menu item “Print…” of menu 1 of menu bar item “File” of menu bar 1
This is a line I tool from an Acrobat script I wrote to print multiple docs, but it won’t work here…any advice would be greatly appreciated.
thanks!!!
barbara
set theFolder to choose folder
tell application “Finder” to set thefiles to entire contents of theFolder
tell application “Microsoft Word”
activate
repeat with aFile in thefiles
tell application “Microsoft Word” to open (aFile as string)
tell application “System Events”
tell process “Microsoft Word”
click menu item “Print…” of menu 1 of menu bar item “File” of menu bar 1
delay 1
end tell
end tell
tell application “Microsoft Word” to close saving “No”
end repeat
end tell
MS Word is quite well scriptable, try this instead
set theFolder to choose folder
tell application "Finder" to set thefiles to files of entire contents of theFolder whose name extension is "doc" or creator type is "MSWD"
tell application "Microsoft Word"
repeat with theFile in thefiles
open (theFile as string)
delay 1
print out document 1
close document 1 saving no
end repeat
end tell