Can I create a macro to activate a sub-menu in Office 2016 (Excel, word ...)?

I would like to create a macro in Excel. Problem is that the command is not accessible in main menu, its in a palette.

Select cell line > None (Under Start > Cell lines > None)

Any suggestion to this and similar macros in Office thats only accessible in a palette?

Example: https://dl.dropboxusercontent.com/u/18912392/example.jpg

Hello Andreas,

You’ll either have to click at a location and type-select to get to the right item — e.g. drive the user-interface with Keyboard Maestro.

OR

Use AppleScript.

Run from the Script Editor.app to see how it works before putting it into an Execute AppleScript action in Keyboard Maestro.

tell application "Microsoft Excel"
  set mySel to selection
  set myRange to first item of (get areas of mySel)
  set myBorders to {border top, border bottom, border left, border right}
  repeat with i from 1 to 4
    set theBorder to get border myRange which border (item i of myBorders)
    set line style of theBorder to line style none
  end repeat
end tell

This will remove external borders from the selected range in the front workbook.

Tested on OSX 10.10.5 with Excel 14.5.3 from Office 2011.

Scripting Excel is often seriously hard, but you can do many things.

-Chris

Super, thanks!

Do you know of any good source where I can find Apple-scripts if I would like to create more Excel-macros?

/Andreas

Hey Andreas,

Here are a couple of places to start:

References For Learning & Using Applescript on GitHub.

Learning & Using AppleScript & JavaScript for Automation (JXA) – KM Forum Topic

Holler at me anytime if you have questions.

-Chris

You might try just a google of "AppleScript excel"

The definitive forum for AppleScriptery: macscripter.net

An old reference but nevertheless comprehensive starter to scripting Office: http://www.mactech.com/vba-transition-guide/index-toc.html

Thanks!