There are many CRM spell checker add-ons on the Internet, most of those are free, but they are all server-side spell checkers.
Today let's introduce the new client-side Word Spell Checker which uses Microsoft Office Word spell check function. It does give users a familiar feeling and larger database. It also uses Word's spell check settings. So I think users will love it. It has been used for one of our clients live environment for half year, and it has great feedbacks.
As you can see, the client machine must have Microsoft Word installed for using this technique.(My clients are using Microsoft Office Word 2003, I'm not sure if it's compatible with Word 2007, please feel free to test this solution)
The file needs to be modified is: CRMWeb\Activities\email\edit.aspx
You may already recognized that it's an unsupported customization, so please make backups just in case your customization could damage the system and also could be overwrite by Hotfixs/Rollups.
Just simply add a function:
/* Microsoft Office Word Spelling Check*/
function SpellCheck(field)
{
window.frames[field].document.execCommand("Copy");
textRange = window.frames[field].document.body.createTextRange();
textRange.execCommand("Copy");
try
{
var oWord = new ActiveXObject("Word.Application");
oWord.Visible = false;
oWord.Documents.Add();
oWord.Top = -2000;
oWord.Selection.Paste();
oWord.ActiveDocument.CheckSpelling();
oWord.Selection.WholeStory();
oWord.Selection.Copy();
oWord.ActiveDocument.Close(0);
window.frames[field].focus();
window.frames[field].document.execCommand("SelectAll");
window.frames[field].document.execCommand("Paste");
}
catch(err)
{
alert("Error loading Microsoft Word Spelling Check: " + err);
}
finally
{
oWord.Quit(0);
}
alert("Spelling Check Finished!");
}
You also need to modify the isv.config.xml fie to call this function:
<Entity name="email">
<ToolBar ValidForCreate="1" ValidForUpdate="1">
<Button Title="Spell Check" ToolTip="Spell Check" Icon="/_imgs/ico_18_home.gif" JavaScript="SpellCheck('descriptionIFrame');" />
</ToolBar>
</Entity>
What the function does is copy the text user typed in the Email body(descriptionIFrame), and paste it to a Word document, the document is unseenable because it has been moved out of the screen(oWord.Top = -2000) , then the function call Word.CheckSpelling() method to check the text just pasted. After correct all words, it will paste the whole text back to the Email body, and close the Word process.
small business crm solution |cms software |microsoft crm partner |best open source crm |ms crm training |
Hiç yorum yok:
Yorum Gönder