RE: basic scripting with Excel
RE: basic scripting with Excel
- Subject: RE: basic scripting with Excel
- From: Dennis Cox <email@hidden>
- Date: Tue, 3 Apr 2007 12:24:55 -0600
> From: Mike Eddington
> Sent: Tuesday, April 3, 2007 11:46 AM
> I'm trying to create a script that will open a .txt in Excel to perform
> some functions. The issue I have is simply opening the files which will be
> of various names. I'm very new to Applescript (i.e. clueless), but I had
> used the following to open files/folders of variable names with another
> software in the past, but its not working with Excel.
>
>
>
> on process_item(this_item)
>
>
>
> tell application "Microsoft Excel"
>
> Activate
>
> Open item this_item
>
>
----
When asking about Microsoft Office apps, it's important to state what
version you are using. The scripting dictionary has been significantly
updated.
If you are using Office 2004, you should use the "open workbook" command.
>From the Excel 2004 Applescript Reference:
Opening a workbook
You can open a workbook by using the open workbook command. The following
procedure opens a workbook named MyBook.xls.
open workbook workbook file name "Macintosh HD:Users:Shared:MyBook.xls"
Note It is recommended that you use the open workbook command (Microsoft
Excel Suite) rather than the open command (Standard Suite) to open a
workbook in Excel. In addition to returning a workbook object to which you
can assign a variable, the open workbook command provides several optional
parameters you can set when opening the workbook. If you want to open
multiple workbooks at once, use the open command.
If you are serious about scripting Excel 2004, you should get the AS
reference docs:
<http://www.microsoft.com/mac/resources/resources.aspx?pid=asforoffice>
Dennis
_______________________________________________
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