Why not just go ahead and put a call into the HTML? So that the finished HTML would look like:
    <HTML>
    
    <HEAD>
    <script id="myscr" language="JavaScript1.2">
    function foobar() {
    alert("foobar")
    }
    foobar();
    </SCRIPT>
    </HEAD>
    <BODY>
    This is some body text.
    </BODY>
    </HTML>
Otherwise, how about:
    oIE.Navigate("javascript:foobar()");
Note that I haven't tested this much at all, so it may simply not work.
_________________________
Bitt Faulk