![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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? |
#3
|
|||
|
|||
![]()
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? |
#4
|
|||
|
|||
![]()
Yes, but only if the code is in the ThisOutlookSession class of the Outlook
VBA project. It might or might not work in some other application's VBA project, that's not an Outlook question. -- 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 ... 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 |
#5
|
|||
|
|||
![]()
Understood and thanks for the reply. I'll see if the PPT General fourm has
an equivalent. sr "Ken Slovak - [MVP - Outlook]" wrote: Yes, but only if the code is in the ThisOutlookSession class of the Outlook VBA project. It might or might not work in some other application's VBA project, that's not an Outlook question. -- 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 ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OH YES I THINK THEY DID CALL MR BUT I DID NOT TALK TO THEM MY MAMA SAI CALL HER BACK LATER CUZ SHE IS DOING SOMETHG RIGHT NOW WHY DID YOU CALL ME NO | THEIR IS ONLY ONE ME YES SIR | Outlook Express | 0 | February 25th 07 09:12 AM |
JavaScript Won't Change & Other Problems... | BULLITTS | Outlook Express | 1 | August 2nd 06 07:19 AM |
Formatting Emails with JavaScript | Morrie Williams | Outlook Express | 5 | May 9th 06 01:00 AM |
How do I get JavaScript to run in Outlook? | Chris Mahoney | Outlook - General Queries | 5 | April 18th 06 11:47 PM |
outlook automation in javascript | [email protected] | Outlook - General Queries | 1 | April 7th 06 12:16 PM |