 |
|
|
 |
|
 |
where can i get the latest version of libraries dictionaries..
|
|
|
|
 |
|
|
 |
|
 |
I have a listbox and I am running the spell checker on the items on this list through a foreach loop. After the first execution of this method, every consecutive execution is throwing the following error.
"Word cannot save this file because it is already open elsewhere". When I press OK, a new window pops up asking me to save the normal.dot file.
How do I suppress this message?
|
|
|
|
 |
|
|
 |
|
 |
Sure, you'll get no license problems by using Hunspell - but finding the right version of the dictionary file itself on the web is an adventure that – at least in my case - ends up with frustration.
|
|
|
|
 |
|
 |
Ok, i think i should provide better information where to find the dictionaries. I will do this.
|
|
|
|
 |
|
 |
The count only states how many errors were, independently if they were corrected or not.
In this case launching the spell check, shows, say 5 errors, on canceling without correcting them, will still show a message saying that 5 errors were corrected.
I am wondering if there is away to determine the number of errors that actually were corrected
|
|
|
|
 |
|
 |
Problem is is that checkspelling is working, but because word isn't visible, it's running "in the background". If you set your word app to visible, I think you'll see the dialog box. This is happening in some machines only. Below is the code. Please help....
Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application();
if (str.Length > 0)
{
app.Visible = false;
object template = Missing.Value;
object newTemplate = Missing.Value;
object documentType = Missing.Value;
object visible = true;
object optional = Missing.Value;
object saveChanges = false;
object originalFormat = Missing.Value;
object routeDocument = Missing.Value;
Microsoft.Office.Interop.Word._Document doc = app.Documents.Add(ref template,
ref newTemplate, ref documentType, ref visible);
doc.Words.First.InsertBefore(str);
app.WindowState = 0;
app.Top = -3000;
doc.Application.Visible = true;
Clipboard.SetDataObject(str);
doc.Activate();
doc.CheckGrammar();
object beg = 0;
object end = 0;
doc.Range(ref beg, ref end);
object first = 0;
object last = doc.Characters.Count - 1;
str = doc.Range(ref first, ref last).Text;
doc.Close(ref saveChanges, ref originalFormat, ref routeDocument);
app.Quit(ref saveChanges, ref originalFormat, ref routeDocument);
}
|
|
|
|
 |
|
 |
Hi,
Have you noticed about this problem:
Once we launch the spell checker, and click any other application e before the spell checker is complete/close, it will cause this spell checker application to hang. I think this bug is from Microsoft. Do you know how we can avoid it?
Rgds,
Kiky
|
|
|
|
 |
|
 |
have the same problem, have somebody a solution?
|
|
|
|
 |
|
|
 |
|
 |
Same thing, it happens from time to time, this is part of my code
Dim word_server As New Microsoft.Office.Interop.Word.Application
' Hide the server.
word_server.Visible = False
' Make a Word Document.
Dim doc As New Microsoft.Office.Interop.Word.Document
doc = word_server.Documents.Add()
Dim iErrorCount As Integer = 0
' Copy the text into the Document.
Clipboard.Clear()
Clipboard.SetText(txtISSUE.Text)
doc.Content.Paste()
Dim we As Microsoft.Office.Interop.Word.ProofreadingErrors = doc.SpellingErrors
iErrorCount += we.Count
doc.CheckGrammar()
doc.Content.Select()
doc.Content.Copy() ' all this to avoid the squares on text
txtISSUE.Text = Clipboard.GetText(TextDataFormat.Text)
MessageBox.Show("Spell Check and Grammar Check Finished Errors Found:" + iErrorCount.ToString(), "SpellCheck")
doc.Close(SaveChanges:=False)
btw I know this is vb but is kind the same.
|
|
|
|
 |
|
 |
i am using your code in web application
and clipboard gives error i have not added system.forms in my namespaces...
how can i get through.
Regards
Bilal
|
|
|
|
 |
|
 |
I'm trying to create spell-checking service (raw HTTP). The checking is done in IHttpHandler. But no matter what text I try to check, I always get 0 errors. The same code that I use in the handler works ok (ie. it finds errors) in a standalone application.
Anyone has a suggestion? Thank you!
|
|
|
|
 |
|
 |
If you want more then just the count of errors, try this code:
Word.ProofreadingErrors proofErrors = range.SpellingErrors;
for (int i = 1; i <= proofErrors.Count; i++) {
lstErrors.Items.Add(proofErrors[i].Text);
}
And for a list of suggestions of corrections to the errors:
object oMissing = System.Reflection.Missing.Value;
Word.SpellingSuggestions suggestions = m_WordApplication.GetSpellingSuggestions
(lstErrors.Text, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing);
for (int i = 1; i <= suggestions.Count; i++) {
lstSuggestions.Items.Add(suggestions[i].Name);
}
|
|
|
|
 |
|
 |
Hi,
I want to use the spell checker in a website (usign ASP.NET in C#) but without seeing it's dialog. In other meaning,I want if a word (I have checked it)is true it return true,if it returns it's suggestion words.
I'm sorry for annoyance.
Thanks for advice.
|
|
|
|
 |
|
 |
how to have rtf style spellchecker in richtextbox*?
|
|
|
|
 |
|
 |
Well, I see this approach is very useful, but after the spellchecking dialog closed, the screen splashed because the document is closed. How can I prevent this? How can I close the document silently without splashing?
|
|
|
|
 |
|
 |
Hi!! I prevent this by changing this line:
"object visible=true;"
for
"object visible=false;"
So, the Word Application don´t appears anymore.
PS: I sorry by my English, because I´m Brazilian.
Gustavo Barros
|
|
|
|
 |
|
 |
Hi Friend,
I had change the code from "object visible = true;" TO "object visible = false;" then i got exception "The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))" if this line of code is true then now exception comes. Please guide me and also i want to show this spellcheker as showdialog.
Regards ,
Hawk
|
|
|
|
 |
|
 |
Hi,
This solution is for a desktop application... How can I use Microsoft word's dlls to use for spell check in a web application? Is it possible?
Thanks,
sb
|
|
|
|
 |
|
 |
Put this in your asp page: <SCRIPT LANGUAGE=vbscript> <!-- 'SpellChecker ' PURPOSE: This function accepts Text data for which spell checking has to be done. ' Return's Spelling corrected data ' Function SpellChecker(TextValue) Dim objWordobject Dim objDocobject Dim strReturnValue Dim strVersionNum, strBuild, bReturn 'Create a new instance of word Application Set objWordobject = CreateObject("word.Application") objWordobject.WindowState = 2 objWordobject.Visible = False strVersionNum = objWordobject.Version strBuild = objWordobject.Build 'Create a new instance of Document Set objDocobject = objWordobject.Documents.Add( , , 1, True) objDocobject.Content=TextValue bReturn= objDocobject.CheckSpelling 'Return spell check completed text data strReturnValue = objDocobject.Content 'Close Word Document objDocobject.Close false 'Set Document to nothing Set objDocobject = Nothing 'Quit Word objWordobject.Application.Quit True 'Set word object to nothing Set objWordobject= Nothing MsgBox "The spelling check is complete",vbOKOnly, "Spell Check" SpellChecker=strReturnValue' & "Build:" & strBuild End Function --> </SCRIPT>
|
|
|
|
 |
|
 |
Hi Nyland,
Thanks for the codes. I tried this in C#. I have a reference set to interop.word.dll and at the point where I create a word application as
Word.Application app = new Word.Application();
it throws an authentication error:
Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Could you please give any suggestions? WOuld it be possible to use Microsoft word.dll for spell check in a web application wihtout creating a security hole?
Thanks again,
Saritha
|
|
|
|
 |
|
 |
You should impersonate. A user who has rights to run office applications will be fine.
When you impersonate, it works but somehow you cant see the spell check dialog.
For more than a thousand years her sweet madness
Has murmured its ballad to the evening breeze.
|
|
|
|
 |