Applescript打印Word文档

时间:2009-09-09 21:36:51

标签: macos ms-word printing applescript osx-leopard

有没有办法使用AppleScript在文件夹中打印所有Microsoft Word文档(.doc)?

2 个答案:

答案 0 :(得分:1)

这是未经测试的,因为我没有使用我的Mac,但是你明白了......

tell application "Finder"
try
set the source_folder to choose folder with prompt ¬
"Pick a folder containing the documents to process:"
set these_files to every file of the source_folder
repeat with 
tell application "Microsoft Word"
repeat with doc in these_files
print-out doc
end repeat
end tell
end tell

答案 1 :(得分:0)

tell application "Finder"
    set the source_folder to (choose folder with prompt "Pick the folder containing the documents to process:")
    set these_documents to (every item of the source_folder whose name extension is "doc") as list
    repeat with i from 1 to the count of these_documents
        set this_item to item i of these_documents
        print this_item
    end repeat
end tell