Is it possible to add an image to an email body using vba?
I can send an email with -
.subject
.body
.to
and include an image as well?
Is it possible to add an image to an email body using vba?
I can send an email with -
.subject
.body
.to
and include an image as well?
Have to wrap the image file path/name in an HTML tag. Review two links referenced in https://www.accessforums.net/program...ook-30846.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
thanks, I had the wrong file name. That works ok now.
email images again, sorry about all the little bits on this, this all works ok for a hard coded image -
"<img src='c:\aaa\logo.bmp'>"
is it possible to asign a variable to a form field and use that as the file location? as i have several bussineses in one system
i threw this together just to see what happens, the finn variable does contain the correct text but the image is a cross in the mail message
email_logo = DLookup("[Email logo location]", "[application data]", " [company title] = forms![consignment note tracking incoming]![to company] ")
strt = "<img src='"
mdl = email_logo
ennd = "'>"
finn = strt & mdl & ennd
and added finn in place of <img src='c:\aaa\logo.bmp'>
Variables must be concatenated and not enclosed in quotes. Reference to form control is a variable.
email_logo = DLookup("[Email logo location]", "[application data]", "[company title] = '" & forms![consignment note tracking incoming]![to company] & "'")
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.