On the fly WORD docs... COM

Hi All. I’m currently trying to figure out how to make the following code pump out the dynamic Word DOC instead of saving it to disk…

<?php
 
$realPath = realpath('./');
 $word = new COM('Word.Application');
 $word->visible = false;
 $word->Documents->Add();
 $word->Selection->TypeText('hello ');
 $word->Selection->InlineShapes->AddPicture("http://www.google.co.uk/images/nav_logo2.png", 0, 1);
 $word->Documents[1]->SaveAs($realPath . '\	est.doc');
 
 $word->Documents->Close();
 
 $word->Quit();
 
 $word = null;
 
?>

I’ve managed to get it to save locally, and I guess this would work server suide too, with the right chmod settings fixed up, but I’m trying to figure out some way of presenting this to the user. Thought of using MIME headers, but it didn’t seem to work at all. Tried printf, print, but neither of them did anything except completely shag Apache to the point where most of my system is now running REAAAAAALALALALALALA SLOOOOOOOOOOOOOOOOOWWWWWWW…

Whole final point of this being, I want to give the user a Word Document, without the need to hold it on static memory/ HDD in any form at any time AT ALL… Please say so if you think this sounds like an unreasonable request though… lol :te:

Any feedback would be appreciated… :-/