none
Triple Letters in MS Word RRS feed

  • Question

  • Hi all. I've managed to reproduce wellknown MS Word "triple letters" problem. To reproduce it enough starts some code from timer procedure (wich is called in main thread) and makes calls to Word API with small delay ( ~200 ms).
    e.g.
    Code from VSTO simple plugin.
    window forms timer initialization 
    _delayTimer = new Timer();
    _delayTimer.Interval = 1;
    _delayTimer.Tick += DelayTimerOnTick;
    

    timer procedure
    private void DelayTimerOnTick(object sender, EventArgs eventArgs)
    {
    	_delayTimer.Stop();
    
    	var sel = Globals.ThisAddIn.Application.Selection;
    	sel.get_Style();
    	Thread.Sleep(200); // you can adjust this value to the best reproduction
    	sel.get_Style();
    
    	_delayTimer.Start();
    }
    

    So, now you enough typing quick two different symbols like "abababababa". Each time tripple letters will be appeared.
    e.g.
    abbbababababababa
    Have anybody resolved this problem?
    Thx
     
     

    • Edited by KapitonovM Wednesday, January 18, 2012 12:51 PM
    Wednesday, January 18, 2012 11:17 AM

All replies

  • Dear KaptionovM,

    Not very clear about your problem after reading your post.

    What is wrong with the code?

    Do you encounter some errors or exceptions of the code?

    What is the result do you want to expect?

    What is the version of your word application and what is the type of your project?

    Best Wishes,

    Friday, January 20, 2012 8:06 AM