View Single Post
  #3  
Old November 18th 08, 07:02 PM posted to microsoft.public.outlook.program_vba
SteveR
external usenet poster
 
Posts: 8
Default How do I call a VBA subroutine from Javascript

Well, darn... you caught me!! This was actually for a PowerPoint
application but I didn't see a PowerPoint VBA section and hoping it would be
the the same. So, basically you're saying I need to get a reference (in
Javascript) to the application object and then I can call a method within it.

sr

"Ken Slovak - [MVP - Outlook]" wrote:

This form is in the Outlook VBA project? If so then put a public method in
the ThisOutlookSession class module that you can call from outside and have
that method call whatever you need on the UserForm.

To call a public method in the Outlook VBA in ThisOutlookSession you call it
this way after you get a reference to the Outlook.Application object. Say
olApp is your Outlook.Application object you'd call method Foobar() this
way:

olApp.Foobar()

Of course you also have to make sure that what you pass to that method is
type consistent with what VBA expects and can handle.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"SteveR" wrote in message
news
I have a VBA form that includes a webbrowser control. In the webbrowser
document I've written a Javascript function that, when called, should pass
information to a subroutine in the VBA. How can this be done?



Ads