Greetings!
First, I just want to say I've never come here and not found an answer to any issue I was facing, either by posting (rarely) or by simply searching some keywords. This place is a goldmine!
So, proper supplications having been performed, I now present this poser:
I have a database which I am merging to an HTMLBody for emailing. That much is elementary (thanks to extensive discussion here just last week!)
What I cannot seem to find is a way that I can insert an image from the same folder wherein my database sits into the emails. I also have the image on a sheet in the workbook itself.
I have seen some code that purports to do this, but it makes my brain hurt - it asks to reference Microsoft CDO 1.21 Library which I don't have (Excel 2007). The code I've found is 6+ years old which means that the reference must be obsolete(?)
As well, it involved an InputBox used to choose from a selection of images - I don't need any of that.
Here's what I have:
Spaces for obvious reasons.
NameVar is called from the dB. The usual Dim statements and all exist but I don't want to cloud the immediate issue.
Is there a way to reference the image 'signature.gif,' either by folder or by workbook/sheet/range, and get it put in there? It's the same one for every time, so there will be no variety or need for multiple choices.
I'd like to avoid having to build an entire Outlook session just for one image. Using the CDO bypass is a real time-saver, plus going through Outlook attaches my name "on behalf" and we wish to avoid any personal identifications.
Could I use an "a href = File///" statement? Just a thought . . .
Thank in advance! I'm hoping this one's as fun as the others have been.
First, I just want to say I've never come here and not found an answer to any issue I was facing, either by posting (rarely) or by simply searching some keywords. This place is a goldmine!
So, proper supplications having been performed, I now present this poser:
I have a database which I am merging to an HTMLBody for emailing. That much is elementary (thanks to extensive discussion here just last week!)
What I cannot seem to find is a way that I can insert an image from the same folder wherein my database sits into the emails. I also have the image on a sheet in the workbook itself.
I have seen some code that purports to do this, but it makes my brain hurt - it asks to reference Microsoft CDO 1.21 Library which I don't have (Excel 2007). The code I've found is 6+ years old which means that the reference must be obsolete(?)
As well, it involved an InputBox used to choose from a selection of images - I don't need any of that.
Here's what I have:
Rich (BB code):
StrBod = "< HTML >"
StrBod = StrBod & "< HEAD >< /HEAD >"
StrBod = StrBod & "< BODY >"
StrBod = StrBod & "Dear " + NameVar + ",< p >< p >"
StrBod = StrBod & "You rock.< p >< p >"
StrBod = StrBod & "We are pleased to have you as a member of this exclusive club.< p >< p >"
StrBod = StrBod & "Director A. Person,< p >< p >"
StrBod = StrBod & "< img src=signature.gif >,< p >< p >" 'Brain hurts here.
StrBod = StrBod & "Member Services General Director< p >< p >"
StrBod = StrBod & "People Who Rock Club< p >< p >"
StrBod = StrBod & "< /BODY >"
Spaces for obvious reasons.
NameVar is called from the dB. The usual Dim statements and all exist but I don't want to cloud the immediate issue.
Is there a way to reference the image 'signature.gif,' either by folder or by workbook/sheet/range, and get it put in there? It's the same one for every time, so there will be no variety or need for multiple choices.
I'd like to avoid having to build an entire Outlook session just for one image. Using the CDO bypass is a real time-saver, plus going through Outlook attaches my name "on behalf" and we wish to avoid any personal identifications.
Could I use an "a href = File///" statement? Just a thought . . .
Thank in advance! I'm hoping this one's as fun as the others have been.