Hi and Thanks in advance!!
I have a Macro that works very well when I have to send eMails to say 50 people through OutLook using VBA
I am adding a Image located sometines on a WEB, sometimes in my drive
That works ok
My Problem If I don't do
.DISPLAY before sending the mail
the attached images are coming whites
I thought I needed to use:
but does not work
SO my question:
IS IT MANDATORY to use .display to sent a mail if I want to see the attached images within the OutMail.HTMLBody ???
PS: my code:
If I use .display the image comes PERFECT
I have a Macro that works very well when I have to send eMails to say 50 people through OutLook using VBA
I am adding a Image located sometines on a WEB, sometimes in my drive
That works ok
My Problem If I don't do
.DISPLAY before sending the mail
the attached images are coming whites
I thought I needed to use:
Code:
Application.Wait Now() + TimeValue("00:00:03")
SO my question:
IS IT MANDATORY to use .display to sent a mail if I want to see the attached images within the OutMail.HTMLBody ???
PS: my code:
Code:
With OutMail
.To = wEmail 'wEmail = "aaa@gmail.com"
.Subject = wSubject 'wSubject = "Ref.: My JOB"
.Body = wTextBody 'wTextBody = "Hi there..."
.Attachments.Add wFN, , 0 'wFN = "C:\000_ExcelProjects\Fagor\Images\myImage.JPG"
'wN = "myImage.JPG"
.HTMLBody = .HTMLBody & "<br>" & "<img src='cid:" & wN & "'" & "width='" & xWidth & "' height='" & xHeight & "'><br>" '''OK
.HTMLBody = .HTMLBody & "<br>"
'Application.Wait Now() + TimeValue("00:00:02")
'IF I DONT do:
'.display 'before sending the image comes BLANK
.send
End With
Set OutApp = Nothing: Set OutMail = Nothing
If I use .display the image comes PERFECT