Word Macro to Open a Variable File Name Needed

A very interesting one!

I maintain a Word document to keep track of items that I need to get done, the related conversation, follow up dates and more. I create a new file every month and use a standard naming convention.

I created a macro but the way I tried to create the “variable” file name is not working. The macro is here:

Start Word and Load To Do.kmmacros (2.7 KB)

Would very much appreciate your help with the above.

Thank you.

PS. Again, I could do this is AppleScript (i.e. I wrote a script that works) but it defeats the purpose not to mention that I cannot get AppleScript to work within KM!

At a glance, it looks like all you should need to do is use the syntax for referencing variables in your Open File action:

~/Documents/Projects On The Go/To Do Lists/%Variable%FileName%

@gglick, excellent and thank you!

That worked like an absolute charm!

1 Like

Hey Joel,

Take note of these:

Variables user manual section

Tokens user manual section

Text Fields

Tokenized variable names are formally of the format:

%Variable%Variable Name%

Unfortunately %Variable Name% also is legal – but should be avoided – as it's too easy to confuse with an actual KM text-token.


Appreciated, some reading material for the stationary bike!

I cannot believe how much there is to learn! It is a bit overwhelming, especially for a nice like me!

I've been using Keyboard Maestro at a super-user level for about 17 years now, and I still don't know everything (or remember everything) about it.


  • Take your time.
  • Learn the terminology.
  • Look through all the menus carefully.
    • You won't remember everything but you'll begin to build your mind map of Keyboard Maestro.
  • Look through the Actions Panel (Cmd-K), and familiarize yourself with all the categories.
  • Use the help
    • Option-Key in menus.
    • Help link in dialogs.
  • Use the search field in the Help Menu.
  • Use the Insert By Name functions in the Edit menu – actions, tokens, functions, variables, and dates.
  • Don't spend more than 30 minutes banging your head against a problem.
    • The world has enough dain brammage already.
    • Search the forum.
      • If you don't find answers pretty quickly then ask.

Your adventure has only just begun...



@ccstone, thanks for the encouraging words!