PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// Some servers may have an auto timeout, so take as long as you want.
set_time_limit(0);
// Show all errors, warnings and notices whilst developing.
error_reporting(E_ALL);
// Used as a placeholder in certain COM functions where no parameter is required.
$empty = new VARIANT();
// Load the appropriate type library.
com_load_typelib('Word.Application');
// Create an object to use.
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
// Open a new document with bookmarks of YourName and YourAge.
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
I am getting the error message,
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Access is denied. ' in D:\DocStation\testing_MIME\11.php:79 Stack trace: #0 D:\DocStation\testing_MIME\11.php(79): com->com('word.applicatio...') #1 {main} thrown in D:\DocStation\testing_MIME\11.php on line 79
Can anyone give me as suggesstion to solve this issue?
Regards,
Jasmine
Last edited by Benjamin on Sat Jun 06, 2009 1:28 pm, edited 1 time in total.
Reason:Added [code=php] and [quote] tags.