note 90076 modified in book.com by danbrown

From: Date: Sun, 05 Apr 2009 05:45:05 +0000
Subject: note 90076 modified in book.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-152826@lists.php.net to get a copy of this message
If you are trying to get the properties of a Word document opened via COM object, you may need to define some constants in your script like so. <?php define('wdPropertyTitle', 1); define('wdPropertySubject', 2); define('wdPropertyAuthor', 3); define('wdPropertyKeywords', 4); define('wdPropertyComments', 5); define('wdPropertyTemplate', 6); define('wdPropertyLastAuthor', 7); $word = new COM("word.application") or die ("Could not initialise MS Word object."); $word->Documents->Open(realpath("Sample.doc")); $Author = $word->ActiveDocument->BuiltInDocumentProperties(wdPropertyAuthor); echo $Author; ?> --was-- If you are trying to get the properties of a Word document opened via COM object, you may need to define some constants in your script like so. define('wdPropertyTitle', 1); define('wdPropertySubject', 2); define('wdPropertyAuthor', 3); define('wdPropertyKeywords', 4); define('wdPropertyComments', 5); define('wdPropertyTemplate', 6); define('wdPropertyLastAuthor', 7); $word = new COM("word.application") or die ("Could not initialise MS Word object."); $word->Documents->Open(realpath("Sample.doc")); $Author = $word->ActiveDocument->BuiltInDocumentProperties(wdPropertyAuthor); echo $Author; http://php.net/manual/en/book.com.php

« previous php.notes (#152826) next »