Re: Can't get name of Window 1 in Excel
Re: Can't get name of Window 1 in Excel
- Subject: Re: Can't get name of Window 1 in Excel
- From: Larry McMunn <email@hidden>
- Date: Sun, 2 Oct 2005 08:06:27 -0400
Title: Re: Can't get name of Window 1 in
Excel
Robert Poland <email@hidden> wrote:
The following script fails with MS Excel version X, "Can't get
name
of Window 1.".
tell application "Microsoft
Excel"
Activate
delay 1
set fileName to Name of Window 1
display
dialog "fileName = " & fileName
end tell
Robert,
This works for me:
tell application
"Excel_2004"
activate
set sName to name of active sheet
set bName to name of active workbook
display dialog sName & return & bName
end tell
While we see it in a window, Excel refers to it as the active
sheet.
--
Happy Automation! :-)
Larry McMunn
President
McMunn Associates, Inc.
Collingswood, NJ
Seminole, FL
Main Office: (856) 858-3440
Mobile: (856) 261-7018
FAX: (856)
869-5936
---------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden