Re: Problem in using word object

Tech-Archive recommends: Speed Up your PC by fixing your registry



Make sure to release all unmanged resources in a finally block and handle
all errors. You will see it disappear from the list of running processes.
If it does not, I'd verfiy that you do not have an unhandled exception.

D


try{

//All your previous spellchecking

}finally {


Word_App.Quit(ref falseRef, ref missing, ref missing);

System.Runtime.InteropServices.Marshal.ReleaseComObject(Word_App);



}

D


"Gomathi" <gomathi@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uPTvx0EEGHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
> hi all,
>
> In my windows application, i added a word object reference.
> Using word object, i'm doing spell checking. After spell checking, i
> quited the word object. But still its running in task manager and
> utilizing 100% in CPU. How to solve this?. I attached the code which i
> used in my application.
>
> string strVal = "Good";
> Word.Application oWord = new Word.Application();
> object missingType = Type.Missing;
>
> bool blnSpell = oWord.CheckSpelling(strVal,
> ref missingType, ref missingType, ref missingType,
> ref missingType, ref missingType, ref missingType,
> ref missingType, ref missingType, ref missingType,
> ref missingType, ref missingType, ref missingType);
> if(blnSpell)
> label3.Text = "Correct";
> else
> label3.Text = "InCorrect";
>
> oWord.Quit(ref missingType,ref missingType,ref missingType);
>
> My ambition is to use spell check in my application. Is there is any other
> way to do this?
>
> Thanks in advance.
> Regards,
> Gomathi
>


.



Relevant Pages

  • Problem in using word object
    ... i added a word object reference. ... Using word object, i'm doing spell checking. ... ref missingType, ref missingType, ref missingType, ...
    (microsoft.public.dotnet.general)
  • Problem in using word object
    ... i added a word object reference. ... Using word object, i'm doing spell checking. ... ref missingType, ref missingType, ref missingType, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Problem in using word object
    ... i added a word object reference. ... Using word object, i'm doing spell checking. ... ref missingType, ref missingType, ref missingType, ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Problem in using word object
    ... i added a word object reference. ... Using word object, i'm doing spell checking. ... ref missingType, ref missingType, ref missingType, ...
    (microsoft.public.dotnet.framework.windowsforms)