Mail automation

Munir Ahamed 1 Reputation point
2022-09-23T05:07:24.657+00:00

How to sent a mail using VBA via Outlook, please share the VBA Code

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,983 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,726 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Colardelle 1 Reputation point
    2022-09-23T08:18:21.63+00:00

    Here's a simple example :

    Set olApp = CreateObject("Outlook.application")  
    Set m = olApp.CreateItem(olMailItem)  
    With m  
        .Subject = "Subject"  
        .Body = "Body"  
        .Recipients.Add "test@test.com"  
        .Attachments.Add "C:\xxxx.PDF"  
        .Send  
    End With  
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.