Help for this page

Select Code to Download


  1. or download this
    #$word_app = Win32::OLE->new('Word.Application', 'Quit(wdDoNotSaveChan
    +ges)'); # Winword program doesn't terminate
            #$word_app = Win32::OLE->new('Word.Application', 'Quit'); # Pr
    +oblem: Ask for save changes for all documents
            #$word_app = Win32::OLE->new('Word.Application'); # 2 Winword 
    +programs which doesn't terminate.
            $word_app = Win32::OLE->new('Word.Application', 'Quit(wdDoNotS
    +aveChanges)');
    
  2. or download this
    if ($obj = $word_app->Documents->open($file, 0, 1)) {
        $obj->Close('wdDoNotSaveChanges');
    }