Problem to open wordpad
Posted: Fri Jan 30, 2009 4:42 am
hai,
i want to open a wordpad, using the PHP.
If i tried this code,
I am getting the error message,
Regards,
Jasmine
i want to open a wordpad, using the PHP.
If i tried this code,
Code: Select all
<?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');
?>Can anyone give me as suggesstion to solve this issue?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
Regards,
Jasmine