Results 1 to 12 of 12

Thread: Changing richtext to bold w/o selecting text first

Threaded View

  1. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    448

    Re: Changing richtext to bold w/o selecting text first

    I have been updating the code above, all night. So if anyone has been trying out the code, you probably got a previous version. As I started working with this, I found many peculiarities concerning the SetFocus property and SendKeys. As a result, it seems best if the following flow is used:

    1. Precede all SendKeys statements (or batch of statements) with the "Show" statement AND <textbox>.SetFocus to make sure that the SendKeys data is going to the correct destination.
    2. Follow-up all SendKeys statements (or batch of statements) with "DoEvents" to finalize that SendKeys operation.

    The new code edited into the original post above, has lots of new documentation in it concerning this. Don't be alarmed by the amount of text...95% of it is documentation (repeated in places, too). Tha actual running code is very small. The old code worked, it just failed when I tried to modify it for another application. After debugging it, this latest version is much more fault tolerant. I apologize if anyone has tried and had problems with the earlier versions. This will be the last version.
    Last edited by treddie; Oct 12th, 2008 at 02:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width