Changes the name, icon, and/or body of a macro. After patch 4.3 then the numeric 'icon' argument has been replaced by 'iconTexture'.

Furthermore, the function always prepend 'Interface\Icons' to the 'iconTexture' string.

See also Macro functions.


newIndex = EditMacro(index, "name", "iconTexture", "body")


  • index - Existing index of the macro (number, macroID)
  • name - New name for the macro (up to 16 characters); nil to keep an existing name (string)
  • iconTexture - name of icon texture; nil to keep an existing texture (string)
  • body - Body of the macro (up to 255 characters); nil to keep the existing body (string)


  • newIndex - Index at which the macro is now saved (may differ from input index if the macro's name was changed, as macros are saved in alphabetical order) (number, macroID)
This function cannot be called during combat