Excel VBA Introduction Part 29.4 - Inserting Pictures in Outlook Emails

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 66

  • @ricardosantos7884
    @ricardosantos7884 5 лет назад +4

    Please, don't stop launching new videos. They are the best of RUclips by far.

  • @officesuperhero9611
    @officesuperhero9611 5 лет назад +3

    I’m glad you’re doing this series again. Andrew, you’re a great teacher and I learned so much from you. I have donated in the past as a thank you for your time. Thrilled to see another video from you!!

  • @nordicdust
    @nordicdust 5 лет назад

    There is no one like you Andrew when it comes to teaching tutorials, you are so gifted and we are so fortunate. Thanks for a nother greate video.

  • @victoropere2107
    @victoropere2107 5 лет назад

    Nice to see you again @andrew Gould

  • @satyajitpandey336
    @satyajitpandey336 5 лет назад +1

    I like the way you teach!!! Please keep making videos!

  • @fabriciocarranza7044
    @fabriciocarranza7044 5 лет назад

    Greetings !!! The best teacher there is!!!

  • @sk2122
    @sk2122 4 года назад

    i really loved the way you explained this. I learned this in one shot. Thanks a lot

  • @wasimx6707
    @wasimx6707 5 лет назад +1

    Makes me delighted that you r back Andrew 😂😂😂😂

    • @wasimx6707
      @wasimx6707 5 лет назад

      @@WiseOwlTutorials me and my colleagues are biggest fan of your teaching, keep up the good good work

  • @ftmagicart
    @ftmagicart 5 лет назад

    Cristal clear as usual. Thanks Andrew.

  • @KhoaNguyen-fs6to
    @KhoaNguyen-fs6to 5 лет назад +1

    Nice to hear your lesson again ^^!

  • @krn14242
    @krn14242 5 лет назад

    Thanks Andrew and again, Welcome back.

  • @imranbhatti3750
    @imranbhatti3750 5 лет назад +2

    Hi Andrew. Nice ones. I thought you have discontinued the vba series.

  • @user-mm3ei4wl6h
    @user-mm3ei4wl6h 4 года назад

    Thank you very much for this helpful video

  • @NarendraSunku
    @NarendraSunku 5 лет назад

    Thank you for the nice and informative video. Looking forward for your next video

  • @techsalesforce
    @techsalesforce 3 года назад +3

    Hello!
    In the portion of the video where you insert text before the image, how would you do this with HTML tags in the text?
    Thanks!

  • @prekshapatil8741
    @prekshapatil8741 4 года назад

    This really helped!!
    This solved a crucial deliverable..Really happy about the solution :)

  • @leventaslan590
    @leventaslan590 4 года назад

    Thank you very much, it was very useful...

  • @MohamedAshraf-ez2nj
    @MohamedAshraf-ez2nj 4 года назад

    That was amazing!!... Can we apply the same approach with vbScript...Could you give some hints?

  • @fabriciocarranza7044
    @fabriciocarranza7044 5 лет назад

    Awesome!! Speechless. Thank you

  • @AmrMatar
    @AmrMatar 5 лет назад

    Thanks Andrew, I love it.

  • @dragonnam4724
    @dragonnam4724 5 лет назад +3

    Wow; i have waited 1 year since your last video; sr for my bad English

    • @dragonnam4724
      @dragonnam4724 5 лет назад

      @@WiseOwlTutorials One year ago; i have no idea about VBA; your video is the best ; i keep watching your list video everyday ; i hope you will continue series VBA ; honesly

    • @KhoaNguyen-fs6to
      @KhoaNguyen-fs6to 5 лет назад

      @@WiseOwlTutorials I have learned from your lessons. And I had adapted it to extract data from SAP when I worked at CCBVL. I even created an interface to do inventory count, but the idea is death for some reasons which relate to my college.
      I had done that and all thanks to you!
      God bless you sir!
      ^^!

    • @dragonnam4724
      @dragonnam4724 5 лет назад

      @@WiseOwlTutorials i am glad to hear that; thank you so much :)

  • @Tat-cx1lr
    @Tat-cx1lr 4 года назад

    Merci beaucoup

  • @inigosanchez-ostizchivite5441
    @inigosanchez-ostizchivite5441 4 года назад

    Great vídeo.
    One question can I use both mail.body and wordeditor in the same mail object??
    Thank you very much

  • @GAURAVKUMAR-th5dz
    @GAURAVKUMAR-th5dz 5 лет назад

    Thank for this video...

  • @mohammadhussain7570
    @mohammadhussain7570 4 года назад

    Hi!! It's a great video!! I have learnt alot from your videos.. i have a doubt..can we add multiple pictures? I have changed the range but still it shows error! Could you please suggest me an idea of how to add two or more pictures!

  • @Xlorate
    @Xlorate 4 года назад

    Very Nice!
    Is there a way not to have to keep selecting the outlook and word object librarys'?

  • @sarhanli
    @sarhanli 5 лет назад +2

    Hi its a great video could you please tell as how to add an internet address as a hypelink to that picture?

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 лет назад +1

      Sure! You can add a hyperlink like so:
      Set doc = mi.GetInspector.WordEditor
      Set shp = doc.Range(0, 0).InlineShapes.AddPicture("C:\Wise Owl\Images\Wise Owl.jpg")
      doc.Hyperlinks.Add shp, "https:\\www.wiseowl.co.uk"
      I hope that helps!

    • @sarhanli
      @sarhanli 5 лет назад +1

      Super thank you soo much

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 лет назад

      You're very welcome!

  • @jjapsilva
    @jjapsilva 4 года назад

    Hi thanks for this great video. Help me a lot. One question, how should I code the Excel VB to insert the text over the image in the email? (considering that I'd like to use the image as a watermark).

  • @ezazhaider3466
    @ezazhaider3466 5 лет назад

    Plz make a video on Birthday mail

  • @TheMayank1000
    @TheMayank1000 4 года назад

    hi Andrew i have done this but i can see half the image. when i manually do WRAP SQUARE then only i can see full image. is there any way through VBA

  • @JustOnYoutube2023
    @JustOnYoutube2023 2 года назад

    What if image to be picked up from another sheet. Which function to use

  • @rwlupus
    @rwlupus 3 года назад

    I need to open outlook message saved as .msg and replace all pictures in body with other images, but keep position and size. I've tried to Attachments.Add method with hidden position which is fine but stuck how to replace old pictures. In simpler case assume there's only one picture.

  • @kashifkhanspecial
    @kashifkhanspecial 5 лет назад

    Hi Andrew,
    Thank you so much for this knowledgeable video tutorial as always, I have couple of requests to you if you have time in near future, can you make tutorials about the points mentioned below.
    Point 1:-
    I have data in excel from range A2:C10 as (Column “A” :- subject of outlook mail), (Column “B” :- time of the mail), (Column “C” :- Sender of the mail) etc.
    Now what I want that when I click on any cell between A2:C10, the mail body of selected mail should show in somewhere in excel as formatted as outlook mail body, that means I want to see the mail body of the selected mail in the excel, no need to go outlook to see the output. I searched this on google, however I did not find any answer, kindly request to you please please please post the video tutorial about above problem.
    Point 2:-
    I have a situation where I want to save the attachments from the outlook inbox, where a mail has a attachments, the attachments can be anything like word file, excel file, image, text file etc.,
    I found some code from net to resolve this problem, however the problem is that it is also considering those mails that has not any attachments but the embedded pictures pasted in the mail body.
    I want to save those attachments that are attached with the mail not images pasted in the mail body.
    I hope I described my problem clearly.
    Finally thank you so much for these tutorials, I learned a lot means a lot from watching your video tutorials.
    Thanks
    Kashif

    • @kashifkhanspecial
      @kashifkhanspecial 5 лет назад

      Hi Andrew, Thank you so much for reply, I will try the code you post in the reply and let you about the outcome, as always thank you so much for your precious time.
      Thanks
      Kashif

  • @twright3296
    @twright3296 4 года назад

    I have worksheet with an image and want to send worksheet as attachment and include images within worksheet. when I do this it does not include image. How do I get the image to stay in the attachment? Sending vba email with outlook

  • @inderjitkaur3230
    @inderjitkaur3230 4 года назад

    I would like to add Thank You at the last of email after that picture.. What I have to write in a code for that or how to do that?

    • @omercemaydinguler210
      @omercemaydinguler210 4 года назад

      hey, if you find the answer could you share it with me?

    • @harryweaver5047
      @harryweaver5047 2 года назад

      Hello. Just wondering if you did manage to find a solution to this? I too would like to do this. Thanks!

  • @supercop5555
    @supercop5555 3 года назад

    How do i center align it

  • @aniketankarshetti730
    @aniketankarshetti730 5 лет назад

    Hi Andrew, the code Error 287: Application-defined or object-defined error on doc.Inspector. I have the word reference checked. Can you help here please ?

    • @Holmely
      @Holmely 4 года назад

      I get the same error :( Do you find any solution ?

  • @akashtribhuvan8124
    @akashtribhuvan8124 5 лет назад

    Can an image be extracted from an Cell instead of drive. Any way to use the image like variable?

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 лет назад +2

      Hi Akash, images in Excel are inserted into a worksheet rather than into a cell. An image belongs to the Shapes collection of the sheet and yes, you can capture a reference to it in a variable. If you want to copy and paste a picture from Excel into Outlook, here's the basic code:
      Sub CopyPictureIntoEmail()
      Dim olApp As Outlook.Application
      Dim olEmail As Outlook.MailItem
      Dim wdDoc As Word.Document
      Dim sh As Shape
      Set olApp = New Outlook.Application
      Set olEmail = olApp.CreateItem(olMailItem)
      olEmail.Display
      Set wdDoc = olEmail.GetInspector.WordEditor
      Set sh = Worksheets("Sheet1").Shapes(1)
      sh.Copy
      wdDoc.Range(1, 1).Paste
      End Sub
      I hope that helps!

    • @akashtribhuvan8124
      @akashtribhuvan8124 5 лет назад +1

      @@WiseOwlTutorials Thanks a lot Sir for your precious time. Appreciate the way you are helping the world to learn VBA. Respect from India 🙏🙏

    • @WiseOwlTutorials
      @WiseOwlTutorials  5 лет назад

      You're very welcome Akash!

  • @GhitescuStefan
    @GhitescuStefan 3 года назад

    Following comment is mainly for information purposes:
    There might be cases that even though all references are enabled, it seems that in Win 10, office 365 has a "run-time error 287: Application-defined or object-defined error" in relation to reaching .WordEditor
    Hope Microsoft will fix this at some point as some scripts became unusable :(
    Am still able to run the script on a Win 7 machine.

  • @shaileshsharma668
    @shaileshsharma668 3 года назад

    Hello sir,
    When I use one code to past the jpg picture as singture and code work fine but when I received email and I try to open that email I get a pop msg Connecting the server in Outlook
    plz help use to fix the issue Thanks in Advance

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 года назад

      Hi
      Shaielsh, I can't seem to replicate the problem you're describing. The code shown in the video works correctly and I can open the email on multiple devices and see the image that has been sent. I'm sorry but I don't know why you're experiencing this problem.

  • @TheSardOz
    @TheSardOz 2 года назад

    Why the record macro won’t record the steps when I use save as picture?

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 года назад +1

      Hi! There's a range of actions the macro recorder won't record (sorry, I don't know the reasons). What is it that you're trying to save as a picture? If it's a chart you can use the Export method docs.microsoft.com/en-us/office/vba/api/excel.chart.export
      I hope it helps!

    • @TheSardOz
      @TheSardOz 2 года назад

      @@WiseOwlTutorials Im trying to save 3 chart object group as one shape into a folder with VBA, but I can’t manage export the shape directly …

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 года назад +1

      @@TheSardOz Yeah, there's a bit of a hacky way around it which involves creating an empty chart, using the CopyPicture method on your group object and then pasting the picture into the the empty chart and then using the Export method on the chart to save it as a picture(!).
      I'll try to get a short answer video done but here's the basic code
      Sub SaveChartGroupAsPicture()
      Dim grp As Shape
      Dim co As ChartObject

      Set grp = Sheet1.Shapes("MyChartGroup")
      grp.CopyPicture

      Set co = Sheet1.ChartObjects.Add( _
      Left:=grp.Left, _
      Top:=grp.Top, _
      Width:=grp.Width, _
      Height:=grp.Height)

      co.Select
      co.Chart.Paste

      co.Chart.Export _
      Filename:=Environ("UserProfile") & "\Desktop\ChartPic.jpg", _
      FilterName:="JPG"

      co.Delete

      End Sub

    • @TheSardOz
      @TheSardOz 2 года назад +1

      @@WiseOwlTutorials yep, I had to do it that way but I might have few extra steps... I would love to see the video and hear the comments..... thank you Mr🦉

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 года назад +1

      @@TheSardOz Glad you found the solution!

  • @micci2395
    @micci2395 3 года назад

    Copied your code and ran it 3 times. It worked. After that it stopped working. The issue happens to be with the mi.getinspector.wordeditor line which returns nothing. I get error 91 'object variable or with block variable not set' on the line: set shp = doc.range(0, 0)....etc. Cannot understand why code would suddenly stop working! Any ideas would be appreciated. I've spent 3 hours googling it. Nothing helpful.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 года назад +1

      Hi Micci! I'm sorry I don't have any idea why it would suddenly stop working, are you still experiencing the same issue?

    • @micci2395
      @micci2395 3 года назад +1

      @@WiseOwlTutorials Thank you for coming back to me. On the day I wrote to you I even rebooted and that didn't work either. So I gave up. The next day it worked. But I got a different error on one occasion. I've learned that if outlook is open already it tends to work more reliably. With outlook closed I never know what I will get!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 года назад +1

      @@micci2395 Interesting, thanks for reporting your findings!