• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Excel 2008 problem getting started
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excel 2008 problem getting started


  • Subject: Re: Excel 2008 problem getting started
  • From: Deivy Petrescu <email@hidden>
  • Date: Wed, 10 Mar 2010 13:58:54 -0500

On 10/03/2010, at 13:21 , Gil Dawson wrote:

> I'm having a little problem getting started scripting Microsoft Excel 2008.  I hope someone can point out what I'm missing.
>
> The following script works...
>
> set theExcelApp to "MBProHD:Applications:Microsoft Office 2008:Microsoft Excel.app"
> tell application theExcelApp
> 	activate
> end tell
>
> ...it activates Excel, as you might expect.
>
> But the following one does not...
>
> set theExcelApp to "MBProHD:Applications:Microsoft Office 2008:Microsoft Excel.app"
> tell application theExcelApp
> 	activate
> 	activate object workbook "2009 Electric Bills Charts V3.xls"
> end tell
>
> ...it gets a syntax error "Expected end of line, etc. but found identifier" with he word "workbook" highlighted.
>
> I've tried this pair of scripts with Smile and Script Editor, and I even even tried them with Excel 2004.  They all do the same thing! This is right out of the book!  What the bleep could be wrong?
>
> I'm using
>
> Microsoft® Excel® 2008 for Mac
> Version 12.2.4 (100205)
>
> AppleScript Editor
> Version 2.3 (118)
> AppleScript 2.1.1
>
> Smile 3.4.2
>
> Mac OS X 10.6.2
>
> MacBook Pro 2.53 GHz Intel Duo
> 4GB 1067 MHz DDR3
>
> I'd sure appreciate some help!
>
> --Gil _______________________________________________



Gil,

you do not say what do you want to do.
I am assuming that the workbook is opened and you want to bring it to the foreground.
This is what you do




tell application "Microsoft Excel"
	activate
	set window 1 to workbook "2009 Electric Bills Charts V3.xls"
end tell


If you use  ***tell application "Microsoft Excel"*** it will bring the latest version.
You will need to specify only if you want to use an older version.



Deivy Petrescu
email@hidden



 _______________________________________________
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

  • Follow-Ups:
    • Re: Excel 2008 problem getting started
      • From: Gil Dawson <email@hidden>
References: 
 >Excel 2008 problem getting started (From: Gil Dawson <email@hidden>)

  • Prev by Date: Excel 2008 problem getting started
  • Next by Date: Re: Excel 2008 problem getting started
  • Previous by thread: Excel 2008 problem getting started
  • Next by thread: Re: Excel 2008 problem getting started
  • Index(es):
    • Date
    • Thread