• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 787
  • Last Modified:

HTML email signature using vbs won't insert an image.

I am using a vb script to create a standard email signature for our staff, and the script will run at log in. All works well except for the insertion of an image(s) of our logo.

For the insertion of the image, the relevant line in the script is:
htmlFile.Write("<div><img Border =""40"" align=""Left"" width=""1000px""img src=""" & pathToCopyTo & dsqLogoSmall & """>")

When I test the script by running it for just myself, it creates the signature , and inserts the image correctly, when I view the results by clicking on new email in Outlook.
However, if I view the results In Outlook by going File -> Options _> Mail -> Signatures and opening in to the area where a signature is manually created /edited, I can see the text of the signature I have created, but no inserted images.
When I send an email , there is a blank area where my image should be , but is not - and this is in situations where the the email client isn't blocking images, because if I maually insertt an image in to the signature that has been automatically created by the script, the image is inserted and can be seen when an email is sent
Am I inserting the image in the incorrect way using my vb script ?
  • 2
1 Solution
Can you provide an example of what (pathToCopyTo & dsqLogoSmall) would resolve to?  Maybe this is a file/folder  permissions error.  What if you substitute a url instead (img src = ""http://www.acme.com/images/mylogo.jpg""
In my opinion just have the file copied to the signature folder first and than just add the name to src=""image.jpg"" for example, you could to this through the script, it's generally best not to use an absolute path in a signature.
JimGorAuthor Commented:
I've decided to point to a URL instead, nameley our web site, with the logos stored under a folder there. This seems to be working in most situations - naturally if an email recipient is reading email off-line, they won't see the logos., but I guess a lot of email applications, block the downloading of images , anyway.
Thanks for your help and prompt reply.
Actually my solution works since the image is embedded into the email, so appears as part of the email, I've used the same method to build a company signature creator in AutoIT it uses Active Directory to obtain the users information, phone, mobile etc... and displays the company logo + facebook, twitter linkedin images as embedded rather than links.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now