How to add mail in excel

In Excel, you can add mail functionality using the "Mail" feature, which allows you to send emails directly from within the spreadsheet. Here's how:

Method 1: Using the "Mail" button

  1. Select the cells that contain the data you want to send as an email.
  2. Go to the "Home" tab in the ribbon.
  3. Click on the "Mail" button in the "Clipboard" group.
  4. A new email message will open in your default email client.
  5. Enter the recipient's email address, subject, and message.
  6. Click "Send" to send the email.

Method 2: Using the "Insert" tab

  1. Select the cells that contain the data you want to send as an email.
  2. Go to the "Insert" tab in the ribbon.
  3. Click on the "Insert" button in the "Text" group.
  4. Select "Mail" from the dropdown menu.
  5. A new email message will open in your default email client.
  6. Enter the recipient's email address, subject, and message.
  7. Click "Send" to send the email.

Method 3: Using VBA Macro

  1. Open the Visual Basic Editor by pressing "Alt + F11" or by navigating to "Developer" tab in the ribbon.

  2. In the Editor, click on "Insert" > "Module" to insert a new module.

  3. Paste the following code:

    Sub SendEmail()
     Dim olApp As Object
     Dim olMail As Object
    
     Set olApp = CreateObject("Outlook.Application")
     Set olMail = olApp.CreateItem(0)
    
     With olMail
        .To = "recipient's email address"
        .Subject = "Subject of the email"
        .Body = "Body of the email"
        .Send
     End With
    
     Set olMail = Nothing
     Set olApp = Nothing
    End Sub
  4. Replace "recipient's email address", "Subject of the email", and "Body of the email" with your desired values.

  5. Click "Run" to execute the macro.

  6. The email will be sent using Outlook.

Note: Make sure you have Outlook installed on your computer and set as your default email client for the above methods to work.