in reply to Re: TK and Word do not work together
in thread TK and Word do not work together

Thanks for your answer. But if you press the first Button, the oleTest runs well. If th oleTest sub runs as a standaloe program there occurs no error

Replies are listed 'Best First'.
Re^3: TK and Word do not work together
by zentara (Cardinal) on Nov 16, 2011 at 17:17 UTC
    But if you press the first Button, the oleTest runs well.

    Sure, the way you have MainLoop; before oleTest(), the first button destroys the Tk event loop, leaving OLE to run unfettered.

    Apparently the Tk eventloop and the way OLE runs, are not compatible, but I can't test that here. Usually, you would put your oleTest() into a separate thread, if it interferes with Tk's eventloop.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh