Search code examples
excelvstosendkeysfractionsbloomberg

Send Fraction Keys to Bloomberg Terminal


I am writing a VSTO Excel Addin that communicates with Bloomberg Terminal. I need to be able to SendKeys for the Fractions i.e 1/16 1/32 etc.

I can send 1/2 1/4 and 3/4 as these are ASCII codes 188 - 190.

I have set up a keyhooker to see if I can catch the codes but these keys do not register.

Has anyone else managed to do this?


Solution

  • I have managed to find a solution to the problem. It seems that you can send Ctrl+F9 to get a 1/8, Ctrl+F10 for 1/32 and Ctrl+F11 for 1/64.

    so to send 4.125 you should sendkeys.send("4 ^{F9}") = 4 1/8 or for 4.625 you should sendkeys.send("4 5^{F9}") = 4 5/8

    Hope this helps someone else.