Re: Excel - replacing Yes doesn't function
Re: Excel - replacing Yes doesn't function
- Subject: Re: Excel - replacing Yes doesn't function
- From: kai <email@hidden>
- Date: Tue, 09 Sep 2003 04:46:59 +0100
on Mon, 8 Sep 2003 16:56:27 +0200, Armin Egginger wrote:
>
I wrote a script to save the front document in a .txt file with a
>
special name. This always the same name and should replace the old file
>
at the same location, but Excel don't want to replace it by the script.
>
Excel always ask per dialog - but I don't want this dialog! Is it
>
possible to automate this replace function?
>
>
my Script:
>
>
set FilePath to "MyHD:Users:Armin:Documents:Telfile.txt"
>
>
tell application "Microsoft Excel"
>
Activate
>
Save front document In FilePath As xlText Password ""
>
WriteReservedPassword "" without ReadOnlyRecommended and CreateBackup
>
-- Excel don't accept the "replacing Yes" Option
>
-- Excel don't accept the "Replace true" Option
>
Close document (FilePath as alias) saving No
>
end tell
Try modifying your script to something like this, Armin:
==================================
tell application "Microsoft Excel"
Activate
set DisplayAlerts to false
Save front document In FilePath As xlText
set DisplayAlerts to true
Close document (FilePath as alias) saving No
end tell
==================================
---
kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.