Hi,

Can anyone tell me if the following is a bug in php or a coding error on my
part. When I run the following piece of code I get an error:

Code:
$empty = new VARIANT();
$word = new COM("word.application") or die("Unable to instantiate Word");
$word->Visible = 1;
$word->Documents->Add();
$word->ActiveDocument->MailMerge->MainDocumentType = wdFormLetters;
$word->ActiveDocument->MailMerge->OpenDataSource
("c:\\temp\\test.xls",$empty,$empty,$empty,$empty,$empty,$empty,$empty,$empt
y,$empty,$empty,$empty,"SELECT * FROM test$",$empty,$empty,$empty);

Error:
Warning: (null)(): Invoke() failed: Type mismatch. Argument: 17 in
c:\program files\apache group\apache\htdocs\test6.php on line 93

 I didn't think I had specified 17 arguments in the call to OpenDataSource.

I have checked what data types OpenDataSource is expecting and according to
OLE/COM viewer, it is expecting a BSTR followed by 15 optional variants.

If someone could let me know if its me before I report it as a bug that
would be good.

Thanks in advance
Dave



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to