|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-31 13:00 UTC] service at netwear dot de
Hi!
I am trying to open and save a document with Word 97.
I stripped the code down the the essential.
Everything goes well until the document should be saved.
<?
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 1;
$word->Documents->Open("d:\\docs\\tutorial.doc");
$word->ActiveDocument->SaveAs("test.doc");
$word->Quit();
?>
The saveas-Function produces the following error:
PHP Warning: Invoke() failed: Typ conflict. Argument: 2 in d:\php\wordsave.php on line 5
I tried also $word->Documents[1]->SaveAs("test.doc") with the same result.
Thanks
Harald
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
this is from words typelib, so it might be that you are missing one or two parameters :) [id(0x00000178), helpcontext(0x096b0178)] void SaveAs( [in, optional] VARIANT* FileName, [in, optional] VARIANT* FileFormat, [in, optional] VARIANT* LockComments, [in, optional] VARIANT* Password, [in, optional] VARIANT* AddToRecentFiles, [in, optional] VARIANT* WritePassword, [in, optional] VARIANT* ReadOnlyRecommended, [in, optional] VARIANT* EmbedTrueTypeFonts, [in, optional] VARIANT* SaveNativePictureFormat, [in, optional] VARIANT* SaveFormsData, [in, optional] VARIANT* SaveAsAOCELetter, [in, optional] VARIANT* Encoding, [in, optional] VARIANT* InsertLineBreaks, [in, optional] VARIANT* AllowSubstitutions, [in, optional] VARIANT* LineEnding, [in, optional] VARIANT* AddBiDiMarks); regards, Harald