PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Dec 22, 2014 2:44 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jan 19, 2012 9:55 am 
Offline
Forum Newbie

Joined: Mon Jan 16, 2012 8:50 am
Posts: 2
i have run the following code

<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";

//bring it to front
$word->Visible = 1;

//open an empty document
$word->Documents->Add();

//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("anp.doc");

//closing word
$word->Quit();

//free the object
$word = null;
?>


BUT IT SHOWS THE FOLLOWING ERROR
[color=#FF4040]Loaded Word, version 12.0
Fatal error: Cannot pass parameter 1 by reference in F:\wamp\www\dddddddddd\worddd.php on line 13
[/color]


Top
 Profile  
 
PostPosted: Tue Jan 24, 2012 5:17 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2775
Location: .za
http://www.hotscripts.com/forums/php/31282-fatal-error-cannot-pass-parameter-1-reference.html

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group