oDocument.parentWindow.execScript "function sum(x,y) {return x+y;}"
Msgbox oDocument.parentWindow.Sum(2,3)