We made the copy from one server to another (Apache), and the following instructions no longer work, we have tried various guides but they do not work
Error code: Fatal error: Uncaught exception 'com_exception' with message 'Source: Microsoft Word Description: This command is not available because no document is open
- Microsoft Office 2007
- Windows Server
$word = new COM("Word.Application") or die("Unable to instantiate Word"); $word->visible=1; $wordDocument=$word->Documents->Open($_SERVER['DOCUMENT_ROOT'].$PATH."/modelli_doc/ModificheCDC1.docx"); $bookmarkname = "mese"; $objBookmark = $word->ActiveDocument->Bookmarks($bookmarkname);
The exception is the line with
ActiveDocument Any solution?