Don't know what code you're using to do this, but here's a spellcheck
function that creates a new Word doc. See if this works for you.

function spellcheck($string){
$word = new COM("word.application") or die("The spellcheck function requires
MS Word.");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
$word->ActiveDocument->Close(false);
$word->Quit(false);
$word->Release();
$word = null;
return $corrected;
}

"Jeremy Spielmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying to create a MS Word document from PHP, but I've been
running into some issues.  I was wondering if there was anything in the
config file (php.ini) that needs to be configured before I can do this.
>
> I'm using the example from the manual, but i'm receiving several errors.
>
> ############################
> Loaded Word, version 9.0
> Warning: Invoke() failed: Exception occurred. Source: Microsoft Word
Description: Could not open macro storage. in
C:\Inetpub\wwwroot\php\word.php on line 11
>
> Warning: Invoke() failed: Exception occurred. Source: Microsoft Word
Description: The requested member of the collection does not exist. in
C:\Inetpub\wwwroot\php\word.php on line 15
> PHP Warning: Invoke() failed: Exception occurred. Source: Microsoft Word
Description: Could not open macro storage. in
C:\Inetpub\wwwroot\php\word.php on line 11 PHP Warning: Invoke() failed:
Exception occurred. Source: Microsoft Word Description: The requested member
of the collection does not exist. in C:\Inetpub\wwwroot\php\word.php on line
15
> #################################################
>
> Any help would be appreciated...
>
> Thanks,
>
> Jeremy



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

Reply via email to