Content-Length: 45115 | pFad | http://www.php.net/manual/book.com.php

PHP: COM - Manual
PHP 8.4.3 Released!

COM and .Net (Windows)

add a note

User Contributed Notes 1 note

up
7
acsandeep at gmail dot com
15 years ago
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;
?>
To Top








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://www.php.net/manual/book.com.php

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy