#18676 [Opn->Bgs]: Type conflict error with $word->ActiveDocument->SaveAs

From: Date: Mon, 05 Aug 2002 22:18:07 +0000
Subject: #18676 [Opn->Bgs]: Type conflict error with $word->ActiveDocument->SaveAs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16032@lists.php.net to get a copy of this message
ID: 18676 Updated by: phanto@php.net Reported By: service@netwear.de -Status: Open +Status: Bogus Bug Type: COM related Operating System: Windows 98 PHP Version: 4.2.2 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2002-07-31 13:00:17] service@netwear.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18676&edit=1

« previous php.bugs (#16032) next »