Consulting

Results 1 to 3 of 3

Thread: Solved: I want to send more than 10 .jpeg formatted pictures

  1. #1
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location

    Solved: I want to send more than 10 .jpeg formatted pictures

    Hi there,

    I want to send more than 10 ( or unknown units ) .jpeg formatted pictures are attached in a single email to more than 3 ( or unknown units ) person's addresses with using VBA code.

    It makes no difference in Outlook VBA or Excel VBA.

    Thank a lot.
    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hello,

    Are you having a specific problem with it? If you're just looking for sample code:[vba]Sub MoreThanTenPictures()
    Dim iMsg As MailItem
    Set iMsg = Application.CreateItem(olMailItem)
    iMsg.To = "a@bc.com; b@bc.com; c@bc.com"
    iMsg.Attachments.Add "C:\1.jpg"
    iMsg.Attachments.Add "C:\2.jpg"
    iMsg.Attachments.Add "C:\3.jpg"
    iMsg.Attachments.Add "C:\4.jpg"
    iMsg.Attachments.Add "C:\5.jpg"
    iMsg.Attachments.Add "C:\6.jpg"
    iMsg.Attachments.Add "C:\7.jpg"
    iMsg.Attachments.Add "C:\8.jpg"
    iMsg.Attachments.Add "C:\9.jpg"
    iMsg.Attachments.Add "C:\10.jpg"
    iMsg.Attachments.Add "C:\11.jpg"
    iMsg.Attachments.Add "C:\12.jpg"
    iMsg.Attachments.Add "C:\13.jpg"
    iMsg.Display
    End Sub[/vba]works fine on my end. If you were just looking for sample code this should help (currently in outlook vba but can easily be modified), but if you're unable to do something let us know where you're stuck.
    Matt

  3. #3
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    Hi mvidas, thank you for your help.
    No, there is not any specific problem, only i did not how to i can send it by Oulook VBA.
    Today i found a solution with Excel's VBA but, it was i a little complicated for me.
    But your sample is very easy way to do.


    I wrote codes below with your help, Thanks a lot.

    [VBA]
    Sub EPostayla_Birlikte_Bircok_Ek_Dosyayi_Bircok_Kisiye_Gonder()
    Dim Ileti As MailItem
    Set Ileti = Application.CreateItem(olMailItem)

    With Ileti
    .To = "a@gmail.com; b@yahoo.com; c@hotmail.com"
    .Subject = "Konu Başlığı"
    .Body = "İletinin İ?eriği."
    .Display

    With .Attachments
    .Add "C:\1.jpg"
    .Add "C:\2.jpg"
    .Add "C:\3.jpg"
    .Add "C:\4.jpg"
    .Add "C:\5.jpg"
    .Add "C:\6.jpg"
    .Add "C:\7.jpg"
    .Add "C:\8.jpg"
    .Add "C:\9.jpg"
    .Add "C:\10.jpg"
    .Add "C:\11.jpg"
    .Add "C:\12.jpg"
    .Add "C:\13.jpg"
    End With

    .Display
    '.Send '.Send aktif edilirse ileti g?nderilir
    End With

    End Sub
    [/VBA]
    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •