For example ...
I'd like to translate this VBA macro:
Sub nn()
Workbooks.Open Filename:=Application.TemplatesPath + "Home
Essentials:Finance Tools:Car Lease vs Purchase"
End Sub
To Applescript:
tell application "Microsoft Excel"
set wkbk to open workbook file name TemplatesPath & "Home
Essentials:Finance Tools:Car Lease vs Purchase"
end tell
I can use the actual value of Application.TemplatePath to open the
file ... I'm mostly interested in knowing how to access Application
objects that I know are available via VBA that might not be
documented.
Thanks.
> For example ...
>
[quoted text clipped - 16 lines]
> objects that I know are available via VBA that might not be
> documented.
See <http://www.mactech.com/vba-transition-guide/>
gimme_this_gimme_that@yahoo.com - 29 May 2007 05:10 GMT
Yeah, everyone and their brother is going to point to that article. It
probably does more harm than good. Don't get me wrong it's a good
article. But frankly it's not enough to get you started on Excel.
(One page devoted to working cell assignments on a range? Come on!)
Here is the trick (not in the article)
It turns out that template path is in the dictionary -
tell application "Microsoft Excel"
set wrkbk to open workbook workbook file name (get templates path) &
"Home Essentials:Finance Tools:Car Lease vs Purchase"
end tell