vba - Reset Ignored Spellcheck Words in VSTO for Word 2010 -


in older versions of word, following reset words user had chosen ignore:

application.resetignoreall(); activedocument.spellingchecked = false; activedocument.checkspelling(); 

i'm trying same function in vsto word 2010 , while rechecks words 'ignore once'd, won't recheck words 'ignore all'd. i've tried recording macro while going options->proofing , clicking on 'recheck document,' , while reset ignore list correctly, macro generates same code above.

does know if bug in word 2010/vsto, or if there different way reset 'ignore all' list?

this bug, there workaround in vba, may able adapt vsto. correctly identified, activedocument.spellingchecked broken in word object model, in backstage view under options|proofing recheck document button works correctly. although macro recorder not reveal commands so, 1 can use combination of word built-in macro , sendkeys navigate button "manually" execute command:

application.run macroname:="filenewdialog" 'access backstage view sendkeys "%tp" 'options|proofing sendkeys "%k" 'recheck document button sendkeys "%y" 'yes button confirmation message box sendkeys "{enter}", true 'exit dialog box sendkeys "{f7}" 'perform spell check 

because sendkeys places word sort of manual mode, program ignore programmatic commands upon exiting backstage view. reason above code uses f7 keystroke perform spell check instead of activedocument.checkspelling.

important note testing sendkeys: sendkeys cannot tested stepping through code in vba ide keystrokes sends out when running sent active window @ time of execution (which vba development window). test sendkeys, save macro , attach qat button, can depressed, needed, testing.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -