Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / January 2006

Tip: Looking for answers? Try searching our database.

Problem in using word object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gomathi - 03 Jan 2006 09:52 GMT
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
Drew Wildner - 10 Jan 2006 21:12 GMT
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

> hi all,
>
[quoted text clipped - 26 lines]
> Regards,
> Gomathi

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.