How to send email from Excel with hyperlink in the email body?
In many work scenarios, you may need to send emails directly from Excel, and in some cases, you want to include clickable hyperlinks within the email body. For example, you might want recipients to access files, visit websites, or open other relevant documents straight from the email. You can accomplish this in Excel through several practical methods, including VBA automation, Excel’s built-in hyperlink features, and the use of formulas. Each method has distinct strengths and is suitable for different use cases—whether you prefer automation, manual customization, or spreadsheet-driven link generation. In this guide, we present several approaches for inserting hyperlinks into an email body sent from Excel, and discuss the application value and considerations for each method.
- Insert hyperlink into email body with VBA code
- Generate mailto hyperlinks using Excel’s HYPERLINK formula
Insert hyperlink into email body with VBA code
This method is designed for users who need to send emails with hyperlinks embedded directly into the message body, utilizing Outlook as the sending client. Leveraging VBA allows you to automatically compose and customize emails from within Excel, embedding any desired hyperlink or formatted text in the body. This is particularly helpful for batch sending, workflow automation, or situations where template text and dynamic values from your worksheet need to be included.
1. Open your workbook, then press Alt + F11 to access the Microsoft Visual Basic for Applications window.
2. In the Visual Basic editor, go to Insert > Module, and paste the following VBA code into the module editor.
VBA code: Insert hyperlink into email body
Sub EmailHyperlink()
'updated by Extendoffice 20190815
Dim xOtl As Object
Dim xOtlMail As Object
Dim xStrBody As String
xStrBody = "Hi there:" & "<br>" _
& "Please click " & "<a href="/ & "http://www.extendoffice.com"">Here</a> to open the page" & "<br>" _
& "Thank you."
On Error Resume Next
Set xOtl = CreateObject("Outlook.Application")
Set xOtlMail = xOtl.CreateItem(olMailItem)
With xOtlMail
.To = "Email Address"
.CC = "Email Address "
.BCC = " Email Address "
.Subject = "Subject line"
.HTMLBody = .HTMLBody & xStrBody
.Display
End With
Set xOtl = Nothing
Set xOtlMail = Nothing
End Sub
Notes:
- Edit the hyperlink and the body text in the xStrBody line to suit your requirements. The HTML
<a href="/"></a>
tag is used here—remember to verify your link and visible text. - Replace “Email Address” in the .To, .CC, and .BCC fields with actual recipient email addresses. You can omit the CC/BCC fields if unnecessary (by deleting or commenting out their lines).
- Update “Subject line” in the .Subject line to reflect your intended email subject.
- Ensure Microsoft Outlook is installed and accessible before running this macro.
3. After editing the code, press F5 to run it. A new email window will open in Outlook, prefilled with the specified fields and your hyperlink embedded in the body. Review the message and click Send to deliver it.
Tip: If you encounter security prompts in Outlook, verify that you have access to send emails via code and that your macro security settings allow execution. For best results, always test with a sample message before automating to a larger audience.
Advantages: Supports customizable, formatted HTML emails with embedded hyperlinks and automated sending. Automation can save significant time for recurring or bulk messages.
Disadvantages: Requires Outlook and may need macro security adjustments. Not ideal for users unfamiliar with VBA.
Generate mailto hyperlinks using Excel’s HYPERLINK formula
This approach uses Excel's HYPERLINK function to create clickable links within a worksheet. Clicking these links launches the default email client (such as Outlook or Mail) to compose a prefilled message. With this method, you can predefine the recipient, subject, body content, and even additional links, providing a quick start for message creation—though sending still requires manual intervention by the user.
This is suitable if you want to provide template links for others to use or streamline repetitive email tasks without automation. You may combine this approach with worksheet data to create dynamic email templates for different users.
1. Select the cell where you want to place the mailto hyperlink, for example, B2.
=HYPERLINK("mailto:someone@example.com?subject=Test Subject&body=Please review this link: https://www.example.com","Send Email")
2. After entering the formula, pressing Enter will turn the cell into a clickable link. Clicking the link will open your default mail application with the To, Subject, and Body fields filled in according to your formula content. You may further adapt the formula with cell references for dynamic messages.
- For example, to use values from A2 for the recipient and B2 for the link:
=HYPERLINK("mailto:"&A2&"?subject=Hello&body=Please visit: "&B2, "Email User")
Advantages: Quick to implement, no programming required, and supports dynamic content. Flexible for datasets or generating many links at once.
Disadvantages: Does not automate sending—user must still review and submit each email manually. Email body length is limited by the mailto protocol; long or formatted bodies may truncate or display poorly.

Unlock Excel Magic with Kutools AI
- Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
- Custom Formulas: Generate tailored formulas to streamline your workflows.
- VBA Coding: Write and implement VBA code effortlessly.
- Formula Interpretation: Understand complex formulas with ease.
- Text Translation: Break language barriers within your spreadsheets.
Related articles
Automatically send email based on cell value in Excel
Supposing you want to send an email through Outlook to a certain recipient based on a specified cell value in Excel. For example, when the value of cell D7 in a worksheet is greater than 200, then an email is created automatically. This article introduces a VBA method for you to quickly solve this problem.
Send email if button is clicked in Excel
Supposing you need to send email through Outlook by clicking a button in Excel worksheet, how can you do? This article will introduce a VBA method to achieve it in details.
Send email if due date has been met in Excel
Supposing the due date in column C is less than or equal to 7 days (current date is 2017/9/13), then send an email reminder to the specified recipient in column A with specified content in column B. How to achieve it? The method in this article can do you a favor.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.





- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in