Sending an Excel report that contains a macro means sending the workbook as a macro-enabled file (.xlsm), not as a plain .xlsx — otherwise the VBA code is stripped out and the report arrives dead. Save the report as .xlsm, test it once with the macro intact, then attach it through your normal email client or through Outlook's built-in send feature. Some mail systems block macro attachments entirely, so the practical answer is often to send a macro-free report or share the workbook on a network or cloud location and email the link instead. This guide walks through every option in order of reliability.
What You'll Need
- Microsoft Excel on desktop (Windows or Mac) — the web version of Excel cannot author, run or save VBA macros in a workbook.
- The report workbook open, with the macro tested and working locally.
- An email account you control, and — if you are emailing from inside Excel — the desktop version of Outlook signed in on the same machine. The built-in send feature uses the default mail client, and Outlook is the one that behaves predictably.
- Confirmation of what your recipient is allowed to open. Many corporate mail filters block .xlsm attachments outright.
Step-by-Step
- Confirm the report actually needs the macro. Before anything else, ask whether the recipient needs to run the code or only read the numbers. If they only need the output, save a copy without macros and send that — it is smaller, safer and almost never blocked. Only continue if the macro is genuinely part of the deliverable.
- Run the macro one last time on the final data. Open the workbook, press Alt+F8 (Windows) or open Developer > Macros, select your macro from the list and run it. Check that the refreshed figures, charts or formatting are correct. Sending a workbook whose macro has never been run on that data set is the most common source of embarrassment.
- Save as a macro-enabled workbook. Go to File > Save As, choose Excel Macro-Enabled Workbook (*.xlsm) from the file type dropdown, and save it. Confirm the title bar shows the .xlsm extension. If you use Save a Copy instead of Save As, the same file-type dropdown applies. Note that label wording varies slightly between Excel versions and platforms, but the Mac format list uses the same “Macro-Enabled Workbook” name.
- Strip anything personal or sensitive. Go to File > Info > Check for Issues > Inspect Document and run the inspector to catch hidden worksheets, comments and document properties. Do this manually rather than relying on memory — a macro that writes temporary sheets often leaves one behind.
- Close and reopen the file before sending. This forces Excel to flush any unsaved state and proves the file is not corrupted. If it prompts to enable macros on reopen, click Enable and test once more. A file that fails locally will fail for the recipient too.
- Attach it in your email client. Compose a new message, click Attach, and select the .xlsm file. Keep the subject line descriptive, mention in the body that the workbook contains a macro, and tell the recipient what the macro does and that they may need to click Enable Content when Excel asks. Recipients who know what to expect are far less likely to treat the file as suspicious.
- Alternatively, send it from inside Excel. With the workbook open, go to File > Share > Email (in older versions, File > Save & Send > Send as Attachment). This opens a new Outlook message with the workbook attached in its current saved format. It does not change the file type for you, so the .xlsm save in step 3 still matters.
- Verify receipt. Ask the recipient to confirm the file opened without a “blocked” or “corrupt” warning and that the macro was available. If they report a security warning that only offers no way forward, that is usually a mail-filter block, not an Excel problem — see below.
- If attachments are blocked, use a link instead. Save the .xlsm to a shared network folder, SharePoint, OneDrive or another file-sharing service your organisation approves, set the permissions so only the intended people can open it, and email the link. This sidesteps attachment filters entirely and keeps a single version of the report.
Common Mistakes
- Saving as .xlsx. Excel warns you that macros will be lost if you save a macro-enabled workbook as .xlsx — if you click through that warning, the code is gone. Always check the extension in the title bar before sending.
- Sending from the web version of Excel. Excel for the web cannot save or run VBA. A workbook edited there may be saved without its macros. Do the final save on desktop Excel.
- Leaving hard-coded file paths. Macros that read or write to a folder on your own machine, or that reference another workbook by path, will fail on the recipient's PC. Review the code for paths and either remove them or document them in the email.
- Forgetting to document the security prompt. Recipients who see a macro warning and no explanation often assume the file is malicious and delete it. A one-line note in the email prevents that.
- Assuming everyone can open .xlsm. Some organisations block it at the mail gateway. Check before you send to a large list.
Tips
- Send a copy of the working file, not the working file itself, so your original stays untouched and you keep a clean reference version.
- Name the file with the report date in it (for example SalesReport-Nov.xlsm) so recipients can tell versions apart in their inbox.
- If the macro only formats or calculates, consider converting the output to values and sending a plain .xlsx alongside the macro version. Recipients who only need to read it get a file that opens without any prompts.
- Digitally signing the macro project with a trusted certificate reduces the severity of the security warning for recipients, but only if your organisation already issues such a certificate.
- For recurring reports, put the .xlsm in a shared location and email the link each period — it avoids attachment filters and duplicate copies drifting apart.
Troubleshooting
- Recipient gets “Excel cannot open the file because the file format or file extension is not valid.” The file was almost certainly renamed rather than saved as .xlsm, or it was corrupted in transit. Re-save it from Excel using Save As and try again; if it still fails, send it zipped or as a link.
- Recipient gets a blocked-attachment notice from their mail server. This is a policy on their side, not something you can fix by resending. Send a link to the file instead, or send a macro-free version.
- The file opens but the macro is missing. The workbook was saved as .xlsx. Re-save as .xlsm from your original copy and resend.
- The macro runs but fails partway through. Most often a missing reference to another workbook, a hard-coded path, or an add-in the recipient does not have. Ask what error line appears (press Debug when the error dialog offers it) and check the code for external dependencies.
- Excel shows a security warning and the macro will not run even after Enable Content. The file may be marked as coming from the internet. In Windows, right-click the file, open Properties and look for an Unblock checkbox; ticking it and clicking OK often resolves this. Only do this for files you created or trust.
- Your own Excel will not save the macro. Confirm you are in desktop Excel, that the Trust Center macro settings have not disabled VBA entirely, and that the file is not open read-only from a network location.
Frequently Asked Questions
Can I email an Excel file with a macro?
Yes, as long as you save it as a macro-enabled .xlsm workbook and the recipient's mail system does not block that file type. Some corporate filters do block it, in which case share the file by link instead.
Why does my macro disappear when I email the file?
Because the workbook was saved as .xlsx, which cannot store VBA code. Save it as Excel Macro-Enabled Workbook before attaching it.
Can I send a macro-enabled workbook from Excel for the web?
No. The web version cannot save or run VBA macros. Do the final save in desktop Excel.
Will the recipient's Excel run my macro automatically?
Usually not. Excel's default security settings show a warning bar and require the recipient to click Enable Content. Tell them in the email so they do not mistake it for a virus.
Is it safe to send .xlsm files?
It is as safe as the code inside. Only send workbooks you wrote or have reviewed, and only open .xlsm files from people you trust, since a macro can do anything a normal program can.
What if I only need the numbers, not the macro?
Send a plain .xlsx instead. Copy the report to a new workbook using Paste Special > Values, or save a copy as .xlsx from a version that has no macros, so nothing is lost.