Is it possible to export using a macro?

Is it possible to export using a macro? I can’t do it no matter how hard I try.