Hi, I want to convert a list using python. I have a list of list like this: Read more
Hello, You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library. To activate it, go to Tools in the VBA editor > References. Activate Microsoft Outlook 16.0 Object Library : Then in a module use this subroutine: Sub sendAnEmail(ByRefRead more
Hello,
You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library.
To activate it, go to Tools in the VBA editor > References.
Activate Microsoft Outlook 16.0 Object Library :

Then in a module use this subroutine:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Sub sendAnEmail(ByRef DomainName As String, ByRef SendTo As String, ByRef EmailSubject As String, ByRef EmailBody As String) 'refer to outlook application Dim EmailApp As Outlook.Application Dim Source As String 'launch outlook application Set EmailApp = New Outlook.Application 'refer to a new outlook email Dim EmailItem As Outlook.MailItem 'create a new outlook email Set EmailItem = EmailApp.CreateItem(olMailItem) EmailItem.To = SendTo 'the email adress who the email is sent to EmailItem.Subject = EmailSubject 'write your email subject in this variable EmailItem.HTMLBody = EmailBody Source = ThisWorkbook.FullName 'send the new email EmailItem.Send End Sub |
To test the code, call this code using a buton:
1 2 3 4 5 6 7 8 | Sub testSendEmail() Dim SendTo, EmailSubject, EmailBody As String SendTo = "myemail@example.com" ' put the email adress that will receive the email EmailSubject = "This is a send email test from Excel" ' write your subject EmailBody = "This email is sent from Execl using Microsoft outlook library" ' put the body sendAnEmail DomainName, SendTo, EmailSubject, EmailBody ' call the subroutine by passing the parameters End Sub |
Test:

I hope this will help you.
Good luck!
See less
Hello this code may help you: def flatten_list(original_List): flat_list = [] for sub_list in original_List: for element in sub_list: flat_list.append(element) return flat_list #test original_List=[['a', 'b', 'c', 'd','e'], ['f', 'g', 'h', 'i'], ['j', 'k', 'l'], ['m', 'n', 'o']] print('original listRead more
Hello
this code may help you:
See less