it is doable but will probably require some leg work.
there is a procedure that does that, adeuib/_open-w.p if i'm not mistaken.
but the thing is that there are other procedures that need to be called, maybe, definitions and so on.
i'd recommend downloading the development tools source code off psdn.com code share for your current version and looking at the code.
i didn't find anything either @peg.com or the KB that worked, not for .w files but i could have missed it.
i'd really like to help but i'm kind of tied up in some work at the moment. really interested to hear what you came up with. good luck !