Felix tip: Use a macro to give Felix focus

04/12/10 4:59 PM

The latest version of Felix (1.6.4) has an expanded COM API. One of the new things you can do with this API is control the size and focus of the memory and glossary windows.

As an example, here is a Word macro that will raise Felix to the top of your screen, while keeping the keyboard focus in Word. This is useful if you return to Word after an internet search, etc., and don’t want to go searching around for the Felix window.

Sub ActivateFelix()

    Dim felix As Object
    Set felix = CreateObject("Felix.App")
    felix.Visible = True
    Call felix.app2.MemoryWindow.Raise

End Sub

Now if you assign a keyboard shortcut for this (in Word 2010, it would be File >> Options >> Customize Ribbon >> “Customize” keyboard shortcuts button, then select Macros >> ActivateFelix >> “your keyboard shortcut”).

You could also create a “document changed” event handler, so that every time Word gets focus, Felix is raised to be visible. The code for this is a bit too involved for this blog post, but you can see the Microsoft documentation for how to write document event handlers.

In a future release of Felix, I plan on making functionality similar to this (also remembering the widow sizes and positions) available as a Felix option.

I’ll be updating the API documentation soon with all the new stuff, but for the meantime, here are the APIs for the memory and glossary windows:


  • Raise (method)
  • Left (int)
  • Top (int)
  • Width (int)
  • Height (int)


  • Raise (method)
  • Left (int)
  • Top (int)
  • Width (int)
  • Height (int)
Posted by Ryan Ginstrom | in Felix, tips | 1 Comment »

One Comment on “Felix tip: Use a macro to give Felix focus”

  1. Sako Says:

    Thanks for the excellent tip!

Leave a Reply

  • Search

  • Categories

  • Calendar

    December 2010
    M T W T F S S
    « Nov   Jan »
  • Pages

  • Meta