VBA Unleashed: Send Customized Emails in One Line

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024

ความคิดเห็น • 43

  • @Excelmacromastery
    @Excelmacromastery  ปีที่แล้ว +3

    Let me know in the comments if you find the one line method useful for sending emails😀

  • @debbie6085
    @debbie6085 ปีที่แล้ว +1

    Thank you for the great video. I love code that handles multiple options 😀

  • @KM-co5mx
    @KM-co5mx ปีที่แล้ว +2

    This is a great one! 🤩

  • @sasifexcelsolutions4509
    @sasifexcelsolutions4509 ปีที่แล้ว

    Thank you, off the topic, I watch almost all your videos, I'm looking for advanced filter where the source data is outside of the active workbook. Like code to open the workbook, run the advanced filter and the close the workbook. Thank you for you videos.

  • @free3690
    @free3690 ปีที่แล้ว

    Another amazing video. I send many emails and this function can come in very handy. Thank you for putting it together!

  • @makubexho
    @makubexho ปีที่แล้ว

    Great video as always. Thank you Paul

  • @anthonygeo3
    @anthonygeo3 ปีที่แล้ว

    Great video as per! Super clear and logical steps to guide you from one end to the other. Thanks

  • @Андрій-ф8в
    @Андрій-ф8в ปีที่แล้ว

    Great video!!! It’s exactly what I was looking for❤

  • @josecarlosconejo5724
    @josecarlosconejo5724 ปีที่แล้ว

    Very useful well explained. You got a new subscription

  • @MrAlmolo
    @MrAlmolo 11 หลายเดือนก่อน

    This is great! Thank you!

  • @budiyanto1531
    @budiyanto1531 ปีที่แล้ว +1

    Excellent. Another great lesson. Thank you Paul ❤❤❤. Request for the next lesson “Sending Whatsapp masssages using VBA”. 😁

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว

      Glad you liked it. I'll keep your suggestion in mind.

    • @b99eu
      @b99eu ปีที่แล้ว

      And a video to send a MS Teams Chat message to a specific person. Including to choose the correct teams account… 😊

  • @pbs36
    @pbs36 ปีที่แล้ว

    Very nice video and code. Will likely be using the code in the helper module in the future.
    With some error handling when adding the attachments, that seems to be the most likely point of failure, it seems to be very close to ready to use.
    I will probably integrate also your solution to add charts without using the Clipboard, and make sure to credit you on all the code!

  • @rods6405
    @rods6405 ปีที่แล้ว

    Been doing this since early 90's for sending quotations proposals and product info etc No more fax machines secretaries etc could prepare and send a quote in 30 seconds.

  • @MegaJohny777
    @MegaJohny777 ปีที่แล้ว

    Do you have a solution for using an other "from email" ? I don't think that works good anymore with Office365 and outlook.

  • @abdulrehmanmughal8235
    @abdulrehmanmughal8235 ปีที่แล้ว

    hi sir hope your doing well, Thanks for your contribution in excel vba learing, I have a question when the email send by vba how can i check if the email is not delivered or not without opening outlook by code at the specified email address.

  • @AlihanOZan
    @AlihanOZan ปีที่แล้ว

    Hello, I can't add outlook signature to my excel VBA
    Could you provide me a solution about it?
    Thanks

  • @7Denial7
    @7Denial7 ปีที่แล้ว

    Thanks for your videos, Paul! 😊 Can I ask you a question? Is your main full time job VBA coding? If so, what kind of job is it? I was wondering If one can still get a job as a VBA developer

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +1

      The easiest thing to do is check job listings to see what is available. I would say that there is a lot less pure VBA developer jobs than before meaning that they are usually mixed with other skills.

    • @houstonvanhoy7767
      @houstonvanhoy7767 ปีที่แล้ว

      @Denial7 A friend of mine in my age group works full-time as a COBOL programmer. That is older than VBA.

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว

      @@houstonvanhoy7767 There is a big demand for Cobol programmers because there is a lot of legacy mainframe systems in big organizations still running on COBOL.

  • @houstonvanhoy7767
    @houstonvanhoy7767 ปีที่แล้ว

    Paul: At 00:47, you add a reference to the Microsoft Outlook 16.0 library. What is the scope of that reference? Just to be clear, is it in force (in memory) just for this VBA module, or is it part of my Excel VBA set-up until I decide to remove it?
    Also, can other people use this code if I share the specific Excel file?
    Thanks.

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว

      The scope of that library is for the current project(i.e. workbook) only. You need to add it for each one which makes sense as you don't want to have a library referenced that you are not using.
      In theory the file should work but it tends to causes issues every now and then so that's why we use Late binding when distributing the workbook. Late Binding doesn't use a library reference and instead used CreateObject to connect to the library when the code is running(see this video th-cam.com/video/W0FlKKpZXgw/w-d-xo.html for more)

  • @iiiiii-w8h
    @iiiiii-w8h ปีที่แล้ว

    Hi. Quick question. How could one use a better code editor for vba? Is it possible to use Vscode somehow?

  • @Drzeny
    @Drzeny ปีที่แล้ว

    Using the same approach as you have in this video, are you aware of a good way to pass through a graph object to the send email function so that the graph is included in the body? I cannot find any good support for it so end up copy/pasting the graph which then ties up the clipboard (which I want to use for hyperlinks since passing through an array destroys them..)
    Great video!

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +2

      You can do it like this:
      ' Get the path and filename for the graph image
      Dim chartPath As String, graphHTML As String
      chartPath = ThisWorkbook.Path & Application.PathSeparator & "mygraph.png"
      ' Export the chart to the filename
      Dim myChart As ChartObject
      Set myChart = shEmails.ChartObjects(1)
      myChart.Chart.Export chartPath
      ' CREATE EMAIL HERE
      ' add file as hidden attachment
      .Attachments.Add chartPath, , 0
      ' Create html to add file to the email
      graphHTML = " "
      .htmlBody = graphHTML
      ' SEND EMAIL HERE
      ' Delete the file
      Kill chartPath

    • @Drzeny
      @Drzeny ปีที่แล้ว

      @@Excelmacromastery Ah ok, so I need to save the graph as a file and add it as an attachment? VBA does not have a very good integration with outlook I think.
      Thank you for your reply!

  • @raybooth3001
    @raybooth3001 6 หลายเดือนก่อน

    Doesn't work with New Outlook!

  • @hammeedabdo.82
    @hammeedabdo.82 ปีที่แล้ว

    Have you already explained all the principles of object-oriented programming, such as inheritance, encapsulation, abstraction, and polymorphism, through building applications to understand these concepts?

  • @ousmanetall1286
    @ousmanetall1286 ปีที่แล้ว

    Hi you're very professional, but your speed of teaching is too fast, and explanations are not enough. Please, I want to learn more from you and want you to be as understandable as possible. From Senegal, a country of africa

  • @twiddle7125
    @twiddle7125 ปีที่แล้ว +1

    All I had to do was move the .Display and use the .HTMLBody?? I researched forever to try to get my signature to be included....
    I am experiencing a weird bug, though. I am adding an html span tag to specify my typeface and size since it won't use Outlook's default for some reason, but I can't set the size to 12....I tried 16px and 12pt, but those come out as 10. All other values of px and pt correctly translate as expected....I'm losing my mind with this bug, lol. 11.5pt yields 11.5, 13pt yield 13, but 12pt yields 10. 18px yield 13.5, 14px yields 10.5, but 16px yields 10....whyyyyy? lol

    • @BenLinfordUK
      @BenLinfordUK ปีที่แล้ว +2

      This is quite common phenomena...
      I think the best thing to do would be to get the HTMLBody output and look to replace the exact section of code in the pre-existing CSS Style that gets bundled within the style of the email by default. I found a nifty little subroutine somewhere which uses FSO (FileSystemObject) and TextStream, which can write out to a .txt (Text File). You could then drop that text output into a code editor (so that you get the syntax highlighting to make the output easier to navigate through). Then you can identify which substring you need to target with the Replace() function in VBA for example to adjust to your desired font-size.
      Hope this helps. 🤞

  • @hammeedabdo.82
    @hammeedabdo.82 ปีที่แล้ว

    New.....Now Python in Excel...Bye Bye VBA!

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +1

      Python is not replacing VBA as the scripting language for Excel. It will simply be available in cells to manipulate data.