Send bulk emails using Outlook (with Signatures) - Excel VBA macro tutorial

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 99

  • @pecckfamily
    @pecckfamily 3 роки тому +1

    This worked perfectly. I've been searching far and wide on how to include my signature when sending out emails via a loop. The trick, as you said, was moving .Display above .HTMLBody and adding "& .HTMLBody" to the end of the line. Those simple adjustments fixed it. Bless you sir.

  • @Mrsbrew27
    @Mrsbrew27 27 днів тому

    THANK YOU so much for this! It did work!

  • @RichardWing
    @RichardWing 2 роки тому +1

    Thanks for the video. Is there a way to specify a different outlook signature than than the default? Can we use the name of the signature we gave it when making the signature? If so can I have place holders in the signature, add the signature first an loop back and add excel data in place of place holders? Basically merge dynamic data into a specific outlook signature? I use signatures as templates and manually insert the data I need to use into them depending on the situation. I am hoping to automate these processes.

    • @xtremeExcel
      @xtremeExcel  2 роки тому

      This is definitely possible. You can have various signatures as templates and overwrite the default signature from mail body with the desired template.

  • @KevinQuinn-o4w
    @KevinQuinn-o4w Місяць тому

    Great video. This works; however, when you replace .Body with .HTMLBody I lose the paragraph breaks I had before. How do I fix this? For example, before you replace .Body with .HTMLBody, you had three different lines in the VBA generated email. Those would now show up as concurrently running sentences?

  • @sambisht7426
    @sambisht7426 2 роки тому

    Hi Kamal,
    Your code is great. It really helps me. Now after sending a new mail through this code I want to send a mail again to same email addresses after 3-4 days as a follow up mail, whom I didn’t get the revert in the same email chain/thread after sending first mail. How will I do it? Could you please advise. Thanks

  • @gawrangsoni279
    @gawrangsoni279 4 роки тому +1

    Hello, thank you very much for sharing.
    Can we sort, select and delete multiple mails through mail details on excel sheet.
    Pls help on this.

  • @gillianmcnosehair9097
    @gillianmcnosehair9097 3 роки тому

    Amazing video. Really helpful. How do I amend the body email text so it does not default to calibri, font size 11? Many thanks

  • @Cupids-lx5xj
    @Cupids-lx5xj 3 роки тому +1

    can add one more column? to attach file or all files in folder

  • @gillianmcnosehair9097
    @gillianmcnosehair9097 3 роки тому

    Top man. V useful.

  • @kirtirajpoojary8043
    @kirtirajpoojary8043 3 місяці тому

    How to use the same code to add custom signature which is created in outlook apart from the one which is set to default.

  • @resourcedragon
    @resourcedragon 2 роки тому

    Thank you for this. Just one question, though:
    "For i = 9 to Sheet1.Cells(Rows.Count,1).End(xlUp).Row" makes sense but I've always used "Next i" and not just "Next" at the end of the For loop. Can you get away with leaving out the "i" because it's not a nested loop?

    • @xtremeExcel
      @xtremeExcel  2 роки тому

      including counter with Next is optional. Keeping it in the code makes code more readable. You should use it.

  • @kirannaidu75
    @kirannaidu75 4 роки тому +2

    Hi Kamal, thanks for uploading such useful coding material. I have almost watched all of your videos and huge fan of yours now..can you pls help me if I have to send a dynamic table basis a specific criteria to individual mail id's.for ex.. performance of a partner with a body snap shot..count of the partners could be in hundreds

  • @drs10301
    @drs10301 6 років тому +1

    Hi sir
    Any video on task scheduler in detail as I am looking for tasks to run automatically at scheduled time which will help me in reducing some man-hours

  • @Chiliii139
    @Chiliii139 11 місяців тому +1

    Thank you really appreciate it !

  • @ahmedal-dossary4386
    @ahmedal-dossary4386 4 роки тому +1

    Signature was not added to bottom of mail body when pasting an excel range (table for instance). Any thoughts?

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      can you share your file(having code) please?

  • @sanjurathod8180
    @sanjurathod8180 3 роки тому

    Hello kamal, video found useful , however in the body of the mail, i need paste the snapshot along with signature, i tried.display before htmlbody but not able to get, please help me with this

  • @HoriaRoman2304
    @HoriaRoman2304 2 роки тому

    Working. Thank you

  • @bharathisrini1185
    @bharathisrini1185 4 роки тому

    Hello Kamal, See in your demo excel you have the differnt body of the email for each Row (i.e in Column C ) you have the body for steve different, kamal differnt and for tema is different - i want to send emails at once with the same macro code with attachements but to add signature converting to .htmlbody will send only one email for at column A - Can u explain how to do add signature as default for all emails run in the Macro .
    Excel - column A - "To" ,column B- "CC" column C - "Subject " column D- " Body" Column E- I = "multiple attachments" Column J- Status .
    Below is my code .
    Option Explicit
    Sub Send_Mails()
    On Error Resume Next
    Dim sh As Worksheet
    Set sh = ThisWorkbook.Sheets("Send_Mails")
    Dim i As Integer
    Dim OA As Object
    Dim msg As Object
    Set OA = CreateObject("outlook.application")
    Dim last_row As Integer
    last_row = Application.CountA(sh.Range("A:A"))
    For i = 2 To last_row
    Set msg = OA.createitem(0)
    msg.to = sh.Range("A" & i).Value
    msg.cc = sh.Range("B" & i).Value
    msg.Subject = sh.Range("C" & i).Value
    msg.Body = sh.Range("D" & i).Value
    'I need to include signature as default
    If sh.Range("E" & i).Value "" Then
    msg.attachments.Add sh.Range("E" & i).Value
    msg.attachments.Add sh.Range("F" & i).Value
    msg.attachments.Add sh.Range("G" & i).Value
    msg.attachments.Add sh.Range("H" & i).Value
    msg.attachments.Add sh.Range("I" & i).Value
    End If
    msg.display
    sh.Range("J" & i).Value = "Sent"
    Next i
    MsgBox "All the mails have been sent successfully"
    End Sub

  • @alyamcvay9831
    @alyamcvay9831 4 роки тому

    Hello,
    How would you recommend skipping blank cells?

  • @sarunas44
    @sarunas44 4 роки тому +1

    Hey, thanks , I try to type .HTMLBody but signatute does not appear , I just get error invalid or unqualified reference. Any ideas why?

    • @xtremeExcel
      @xtremeExcel  4 роки тому +1

      Please share your file(having code) with me.

  • @jayjay100
    @jayjay100 4 роки тому

    Hi,
    This is very helpful specially with the signature part.. But what is the code so that you could create multiple emails with signatures.. You changed it on the last part and only made 1 email..

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      I didn't understand your question. Can you share more details please?

  • @jeganraju1372
    @jeganraju1372 4 роки тому

    I need a code for sending a multiple mails with filtered excel table is pasted in body of the email. Pls help me with this requirement

  • @jainishjain1
    @jainishjain1 3 роки тому

    Hi Kamal, this video seems to be a solution for one of my automations. But, I am still getting some errors and unable to find the :Microsoft Outlook reference in the VBA. Is it different with Mac ?

    • @xtremeExcel
      @xtremeExcel  3 роки тому

      Hi Jainish, It could be different for mac. I'll check and let you know.

  • @raushanpandey4553
    @raushanpandey4553 7 місяців тому

    Signature is not working..could u plz help me😊

  • @geethamuthukrishnan8565
    @geethamuthukrishnan8565 Рік тому

    Hi ! how to increase the font size of the body of the letter

  • @rakeshbond009
    @rakeshbond009 6 років тому +1

    Hello Sir, I wanted to paste table from excel to mail body and mail it with default outloook signature. Any idea

    • @xtremeExcel
      @xtremeExcel  5 років тому

      I'll post a video on this soon.

    • @aaronbathan
      @aaronbathan 4 роки тому +1

      @@xtremeExcel Hi sir, were you able to create a video regarding his question?

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      I guess I missed it..

  • @ajithkumarpt
    @ajithkumarpt 3 роки тому +1

    I tried with outlook 2016 and it is showing as Run -time error '429'
    ActiveX component cannot can't create object

    • @xtremeExcel
      @xtremeExcel  3 роки тому

      Quite possible due to many reasons. Do you have admin rights on the machine where you are using the code??

  • @sayedaljaziri9403
    @sayedaljaziri9403 4 роки тому +1

    thanks alot mr , how i can coordinate mail body font and style

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      Either using htmlbody or a template... See other videos of this playlist

  • @upgradetechnicalskills3392
    @upgradetechnicalskills3392 5 років тому +1

    Hi sir good morning
    It's really good job and I am very helpful on this tutorial
    Sir I have two three lines sentence out of that I need change two words for every email how to do that

    • @xtremeExcel
      @xtremeExcel  5 років тому

      @Kurban Ali - please share more precise details of your question. Share the code/snippet/input/output etc.

    • @upgradetechnicalskills3392
      @upgradetechnicalskills3392 5 років тому

      Hi sir I am try to use the same method which one you have shown, I want to send one sentence out of that person name and DOB need to changed for every receptionist

  • @sandeeprawat8497
    @sandeeprawat8497 3 роки тому

    Could you please tell me how to extract email from Outlook with time criteria "9:00pm to 9:00pm"

  • @haripriya2017
    @haripriya2017 3 роки тому

    Hello Sir..in the body part Body 1 = "Number : " .. i want to insert cell A1 value of active sheet..can you please tell me how to provide only one cell range

    • @xtremeExcel
      @xtremeExcel  3 роки тому +1

      please share your file(having code)

    • @haripriya2017
      @haripriya2017 3 роки тому +1

      Can you check your fb messenger sir..I have shared there..

    • @xtremeExcel
      @xtremeExcel  3 роки тому +1

      Sure

  • @bhupesh69
    @bhupesh69 4 роки тому

    can yoou tell how to run macro in shared mail folder

  • @kamalahuja4207
    @kamalahuja4207 4 роки тому +1

    Hello sir, I want to send different pdf attachments to different mail ids

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      Hi Kamal, That's exactly this video explains. Do you have any issue in that?

    • @kamalahuja4207
      @kamalahuja4207 4 роки тому

      @@xtremeExcel thank u

    • @kamalahuja4207
      @kamalahuja4207 4 роки тому +1

      Is there any way to split a word document into pdf with different names . Names with first line of the document

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      Sorry for delayed response. Pdf creation part is explained in this video ua-cam.com/video/tBmSYgZsLwA/v-deo.html

  • @Hitesh-Pitroda
    @Hitesh-Pitroda 4 роки тому

    Dear Sir can give us link for file download of how to add signature in vba bulk mail send

  • @billingbtk8347
    @billingbtk8347 5 років тому +1

    Sir can you tell me easiest way to attached PDF multiple files?

    • @xtremeExcel
      @xtremeExcel  5 років тому

      Hello friend. Do you want to attach multiple pdf as attachment to one email?

  • @smrttgrl
    @smrttgrl 4 роки тому

    Hi. I hope you're still answering, I tried to auto send .send but I got a debug error

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      Please share your file(having code) and details to reproduce the issue.

  • @jeganraju1372
    @jeganraju1372 4 роки тому

    How to add "From" email id in auto sending e-mails. Pl assist.

  • @gajendrasingh9486
    @gajendrasingh9486 Рік тому

    How to add attachments in mail body . Different Different attachments for different different mails.

    • @xtremeExcel
      @xtremeExcel  Рік тому +1

      put attachment file paths in a separate column for each record. Then you can use .Attachments.add cells(r,c).value to attach the file. [assuming r is iterator for row and c is column having attachment paths]

  • @VinayBorkar
    @VinayBorkar 5 років тому

    This is not working when we replace .display with .send, even the mail body is also disappread

    • @xtremeExcel
      @xtremeExcel  5 років тому

      @Vinay don't replace .display with .send. Keep .Display there only and later use .Send once body is ready.

    • @VinayBorkar
      @VinayBorkar 5 років тому

      @@xtremeExcel I have to send more than 100 emails at one go. So it will be difficult to display the mail first. Hope u got it

    • @xtremeExcel
      @xtremeExcel  5 років тому

      Use Application.Screenupdating = False in the beginning and Application.Screenupdating = True in the end.

    • @VinayBorkar
      @VinayBorkar 5 років тому

      @@xtremeExcel This is already updated but still not getting signature while using .send

    • @xtremeExcel
      @xtremeExcel  5 років тому

      Do you have signature set up in outlook? If yes, send me ur excel file and screenshot of a blank outlook email(create a new mail and take screenshot.).

  • @mubaraks8439
    @mubaraks8439 5 років тому

    Hi sir
    Could you please let me know how to split the PDF files using VBA Macros

    • @xtremeExcel
      @xtremeExcel  5 років тому +1

      Hello Mubarak, thank u for ur query. I'll soon add a tutorial for this.

    • @mubaraks8439
      @mubaraks8439 5 років тому

      Thank you sir

    • @mubaraks8439
      @mubaraks8439 5 років тому

      Please update me once you upload the video.

  • @ashleymcgrath8687
    @ashleymcgrath8687 5 років тому

    When I do this my signature still doesn't show up?

    • @xtremeExcel
      @xtremeExcel  5 років тому

      please share ur file with me.

    • @canefan17
      @canefan17 5 років тому

      Make sure you have Ol.Display before Ol.HTMLBody

    • @kishor24129
      @kishor24129 4 роки тому

      kishor kakade Kindly share your code for my reference

    • @xtremeExcel
      @xtremeExcel  4 роки тому

      Don;t have the file handy. But if you have created one, please send over to me and I'll help in fixing the issue.

  • @cu806
    @cu806 5 років тому

    How do we send from shared mailboxes?

    • @xtremeExcel
      @xtremeExcel  5 років тому

      you can use: .SendUsingAccount = OlApp.Session.Accounts.Item(2)

    • @cu806
      @cu806 5 років тому

      @@xtremeExcel I keep receiving an error.
      I packed they syntax under the msg = OA.createitem(0)
      The syntax reads
      .SendUsingAccount =OIAppSession.Acoounts.Item(2)

  • @naziajahan1657
    @naziajahan1657 5 років тому

    its not working :/

    • @xtremeExcel
      @xtremeExcel  5 років тому

      please send your file to me with the details of issue.

  • @rajvenkat3641
    @rajvenkat3641 4 роки тому

    Sir,pls copy the code in the comments pls

  • @shwetanshudubey4021
    @shwetanshudubey4021 4 роки тому +1

    Hi, I followed the code as it is but am getting an error in Sub sendMails() as User- Defined type not defined, can you help?

    • @ericdoury7727
      @ericdoury7727 4 роки тому

      in the visual basic editor, tools/references/ microsoft outlook XX.X object library must be selected.

  • @kishor24129
    @kishor24129 5 років тому

    Hello Sir, I wanted to paste table from excel to mail body and mail it with default outloook signature. Any idea

    • @xtremeExcel
      @xtremeExcel  5 років тому

      Hello Kishor, I am taking up your query as this week's question. I'll post a video on this very soon.

    • @kishor24129
      @kishor24129 5 років тому

      @@xtremeExcel thank you

    • @kishor24129
      @kishor24129 5 років тому

      @@xtremeExcel dear sir
      I am waiting for your video

    • @kishor24129
      @kishor24129 5 років тому +1

      Reminder

    • @xtremeExcel
      @xtremeExcel  5 років тому

      ua-cam.com/video/SrkmgLVdI28/v-deo.html