• 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: Calling VBA Functions Embedded In AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling VBA Functions Embedded In AppleScript


  • Subject: Re: Calling VBA Functions Embedded In AppleScript
  • From: Christian Prinoth <email@hidden>
  • Date: Mon, 14 Jan 2013 09:54:40 +0100

This appears not to be available on Office 2010 for Mac. The easy way out is to create an xla/xlam file in excel with the routines you need, then call them via "run XLM macro".

In theory it should be possible to evaluate vba expressions via the "evaluate" method, like so:

tell application "Microsoft Excel"

set x to evaluate name "application.Name"

end tell


but I can't get it to work. Simple expressions, like "1+1" evaluate correctly, so not sure what the limitation is here.

Otherwise I am afraid you will have to translate your vba code to applescript which is (a) slow (b) does not always work since Office's applescript support is very buggy.

Hth
Christian

On Fri, Jan 11, 2013 at 10:44 PM, Ian was here <email@hidden> wrote:
There is an article on how to do this in Office '04.

http://word.mvps.org/mac/applescript-vba.html



From: Christian Prinoth <email@hidden>
To: Ian was here <email@hidden>
Cc: AppleScript Users <email@hidden>
Sent: Wednesday, January 9, 2013 2:54 AM
Subject: Re: Calling VBA Functions Embedded In AppleScript

I know that you can run VBA methods via applescript run XLM macro, but the method must be within the Office Document (for example an XLA). can you point me to the example you mention to better understand what you are referring to?

Christian

On Tue, Jan 8, 2013 at 6:37 PM, Ian was here <email@hidden> wrote:
Has anyone had any experience calling VBA methods from AppleScript that are actually embedded in the AppleScript file? I've seen an example of this while Googling. The only problem is that the example code does not work with PowerPoint 2011.

Thanks in advance.

 _______________________________________________
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




--

Christian Prinoth





--

Christian Prinoth
 _______________________________________________
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

References: 
 >Calling VBA Functions Embedded In AppleScript (From: Ian was here <email@hidden>)
 >Re: Calling VBA Functions Embedded In AppleScript (From: Christian Prinoth <email@hidden>)
 >Re: Calling VBA Functions Embedded In AppleScript (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Memory leak when adding records in Filemaker
  • Next by Date: Re: Scripting Mail
  • Previous by thread: Re: Calling VBA Functions Embedded In AppleScript
  • Next by thread: launch broken in Mt Lion
  • Index(es):
    • Date
    • Thread