MACSCRPT Archives

June 2010

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nobumi Iyanaga <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sun, 6 Jun 2010 09:18:46 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
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

ATOM RSS1 RSS2