Now let us declare a variable as an outlook application. Step 6: By giving reference to the outlook above, we can now access the properties of outlook in VBA. Step 5: Define a subprocedure as shown below. Step 4: Click on insert tab and insert a module in the VBA project. Let us learn how to send emails through outlook from excel in VBA by an example. In this example, we will also send an attachment to the receiver, the same excel file we will be writing the code. In layman’s term, what is the process and what is the requirement to send an email? An Email consists of an email address of the sender if there is a CC (Carbon Copy ) or a BCC and a subject line with an email body. Now the mailing feature is offered by Microsoft in Outlook, we will use methods and properties of outlook in excel to send emails. To send an email we need to know the basic of email also. This type of automation means accessing a feature of another application using any other application. It requires considerable knowledge of VBA and its methods to write the code to send emails from excel. Before we move to write and sending emails from excel let us know what this automation means. We can send emails through VBA and this is what we will learn in this article. VBA is not only limited to data in excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |