View Single Post
Old 02-06-2009, 01:55 AM   #8 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

That works SketchMedia, with a little bit of re-working. I used the following code and it output a txt document for me, with a folder as well with 2 other files in:

php Code:
try
{
    $szOpenDocument = 'C:/wamp/www/word/word-open.doc';
    $szSaveDocument = 'C:/wamp/www/word/word-save.txt';

    $pWordCOM = new COM("word.application");
    $pWordCOM->Documents->Open($szOpenDocument);
    $pWordCOM->ActiveDocument->SaveAs($szSaveDocument, 8);
    $pWordCOM->ActiveDocument->Close(false);
    $pWordCOM->Quit();
    unset($pWordCOM);
}
catch(Exception $e)
{
    die($e->getMessage());
}
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
Tanax (02-06-2009)