473,786 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in using word object

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.Applicatio n oWord = new Word.Applicatio n();
object missingType = Type.Missing;

bool blnSpell = oWord.CheckSpel ling(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
Jan 3 '06 #1
1 1095
Hi Gomathi,

try making use of

System.Runtime. InteropServices .Marshal.Releas eComObject(obje ct);

Also you might have a look at -
http://support.microsoft.com/?scid=kb;EN-US;317109

HTH.

Kaustav.

"Gomathi" wrote:
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.Applicatio n oWord = new Word.Applicatio n();
object missingType = Type.Missing;

bool blnSpell = oWord.CheckSpel ling(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

Jan 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

57
4306
by: Xarky | last post by:
Hi, I am writing a linked list in the following way. struct list { struct list *next; char *mybuff; };
0
6299
by: mharris | last post by:
I need help with merging two Word documents into one through C# code. The problem isn't so much getting the documents put into one as it is maintaining the appropriate formatting, or rather reformating, after the merge. This is a full description of my needs. I have a C# class library that creates two Crystal Reports, and then exports them to the harddrive as Word documents. One's orientation is landscape, the other is portrait. I then...
0
4028
by: Raj Singh | last post by:
I am facing a problem with Visual C# 2003 and MS Word XP. I am using a customized template for Word and in that template I have defined some bookmarks. I am trying to create a Word document based on the customized template, reading all the bookmarks and replacing them with desired values, resulting in a new one page document being created which is then saved. This all works fine but when I try to extend the process so that the template...
1
1341
by: Handy Mulia | last post by:
I am trying to open the content of a WORD file from C#.NET which resides in the REMOTE SERVER, however I get an error: "System.Runtime.InteropServices.COMException: Server execution failed" when declaring new Word.ApplicationClass(). string fileName = this.btnWorkOrder1.Value; object readOnly = false; object isVisible = false; object saveChanges = false; object missing = System.Reflection.Missing.Value;
16
1734
by: Simon Verona | last post by:
I have a problem with automating MS Word through vb.net My code is : Dim objword As new Word.ApplicationClass Try objWord.Documents.Open(letterfile) objWord.Documents.Item(letterfile).Activate() Catch MsgBox("Error - Word Not running properly - letterfile=" & letterfile &
2
2181
by: Al_P via DotNetMonster.com | last post by:
I have: Win2K Office2000 Working in VB.Net (2003) My .Net project has a reference to Word 9.0 Instantiating things in a simple and straightforward manner: Dim word as Word.Application Dim doc As Word.Document Dim range As Word.Range
1
9075
by: Ronald S. Cook | last post by:
Sorry for the previous duplicate posts. I'm referencing and using the Microsoft Word 11.0 object model from within my VS 2005 C# Windows app. The following lines... objWordDoc.Close(ref missing, ref missing, ref missing); objWordApp.Quit(ref missing, ref missing, ref missing);
6
2347
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any solution. My code can be downloaded from here: http://www.tprimke.net/konto/PyObject-problem.tar.bz2. There are some scripts for GNU/Linux system (bash to be precise). All you need to know is that there are four classes. (Of course, you may...
11
2416
by: leiz | last post by:
Hi, I am using COM to automate Word. In the main thread of my program, I store all the Document objects from Application.Documents. In one event handler (the event generated by Word), if i get all the current documents using Application.Documents, the objects I got are not same ones stored previously. The event handler is called by some threads generated by C#. But, if I get all the current documents using my own threads, the ones...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.