macro - reverse direction of line path

Is it possible to have a macro reverse the path direction of an object?  I know there is a way to do it in Shape Edit mode but would like to flip arrow ends quickly with one click.

I tried recording the function but not luck.