Re: Determine if a Word Document is New or Saved
Re: Determine if a Word Document is New or Saved
- Subject: Re: Determine if a Word Document is New or Saved
- From: Stan Cleveland <email@hidden>
- Date: Fri, 14 Dec 2007 13:07:49 -0800
- Thread-topic: Determine if a Word Document is New or Saved
On 12/14/07 12:59 PM, email@hidden wrote:
> Every Word document has a "saved" property that returns a boolean:
>>
>> tell application "Microsoft Word"
>> saved of document 1
>> --> false
>> saved of document "My.doc"
>> --> true
>> end tell
>>
>> HTH,
>> Stan C.
>>
> Thanks for the info on the "saved" state. This is close to what I need, but
> the issue is finding out if the document has ever been saved (i.e. open a new
> document, its named document1. It has never been saved. It seems "saved"
> will just tell you if there has been a change since the last time the document
> was saved.
>
> Any ideas on how I can get closer?
Taking a cue from Michelle's suggestion, a never-saved document has no data
in its "path" property. (It does, actually, but only null string.)
tell application "Microsoft Word"
path of document 1
--> ""
path of document "My.doc"
--> "MacOS:Users:stanc:Desktop"
end tell
Stan C.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden