页,当前文件保存为.doc和覆盖当前文件

问题描述:

我想保存当前打开的文件的.DOC覆盖当前文件.. 所以我必须要找到当前打开的文档的路径,然后保存当前文件在同一路径上,保存为.DOC页,当前文件保存为.doc和覆盖当前文件

任何人都可以帮助吗?我试过很多方法,但总是失败... (我在OSX 10.6与09页)

感谢

给这个一抡:

tell application "Pages" to tell document 1 
    set oldname to name 
    set oldPath to get path 
    try 
     set docPath to oldPath 
    on error 
     set oldPath to (path to documents folder as text) & oldname & ".pages" 
     save in oldPath 
    end try 
    tell application "System Events" to set oldPath to path of disk item oldPath 
    if oldPath ends with ":" then set oldPath to text 1 thru -2 of oldPath (* useful is the app saves as packages *) 
    set docPath to text 1 thru -(1 + (count of "Pages")) of oldPath & "doc" 
    save as "Microsoft Word 97 - 2004 document" in docPath 
end tell 

来源:MacScripter,所以你可能需要摆弄一下。