Hello Deivy,
Thank you very much for your reply.
On Jun 6, 2010, at 6:06 AM, Deivy Petrescu wrote:
> On Jun 5, 2010, at 2:36 PM, Nobumi Iyanaga wrote:
>
>>
>> set fpath to "Macintosh HD:Users:[me]:Documents:Backup:mydocfile.doc"
>>
>> set convert_fpath to my replace_doc_with_rtf_MacPath(fpath)
>>
>> tell application "Microsoft Word"
>> activate
>> open fpath
>> save as active document file name convert_fpath file format
>> format rtf
>> close active document
>> end tell
>>
>> on replace_doc_with_rtf_MacPath(fpath)
>> set perl_scpt to "$_ = shift; s/\\.doc$//; s/$/\\.rtf/; print;"
>>
>> return (do shell script "perl -e '" & perl_scpt & "' " & quoted
>> form of fpath)
>> end replace_doc_with_rtf_MacPath
>>
>> Now, it says:
>>
>> Microsoft Word got an error: active document doesn't understand
>> the save as message.
>>
>> I don't understand at all. What am I doing wrong...?
>>
>> Thank you in advance for any insight.
>>
>> Best regard,
>>
>> Nobumi Iyanaga
>> Tokyo,
>> Japan
>>
>>
>
> Nobumi,
> ditch the quoted form!
> You are working with Mac path not Unix path, you don't need the
> quoted form
>
Well, unfortunately, removing "quoted form of" doesn't change the
situation. I still get the error message:
active document doesn't understand the save as message.
Does anyone have any other idea?
Thank you in advance!
Best regard,
Nobumi Iyanaga
Tokyo,
Japan
|