Reading Javascript function returned value after execScript()

Add-in Express™ Support Service
That's what is more important than anything else

Reading Javascript function returned value after execScript()
Rock Solid Technologies

Posts: 1
Joined: 2014-03-15
I want to be able to obtain the returned value of a Javascript function executed at an HTML page. Currently if I do
I can see the right value in the alert box. I need to obtain that value to populate a field in my toolbar. How can I obtained the returned value of getUserId()? Let's say that I want to store it in a variable named "userID", then I am executing
var userID = HTMLDocument.parentWindow.execScript("getUserId()","JScript")
but userID is null.
Posted 15 Mar, 2014 15:54:29 Top
Andrei Smolin

Add-in Express team

Posts: 18423
Joined: 2006-05-11

According to, this method always returns null in IE11.

I suggest that you check the example "Module-script two-way interaction" in the manual, see the PDF file in the folder {Add-in Express}\Docs on your development PC. You can download the most recent version of the Developer's Guide at

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Mar, 2014 10:28:52 Top