PDA

View Full Version : [SOLVED:] Inserting non default signature with picture in Outlook e-mail



vanhunk
04-29-2015, 05:06 AM
Inserting a non default signature containing a picture in an Outlook e-mail with Excel:
Can this be done?
It seems to be impossible to use VBA to insert a signature containing a picture into an Outlook e-mail created by Excel (2007+).

If this isn't possible, is it possible to change the default Outlook e-mail with Excel and then use the default method for signatures containing pictures (this would not be the preferred method, because of the flickering caused!)?

Refer to the web page by Ron de Bruin:
http://www.rondebruin.nl/win/s1/outlook/signature.htm

Regards,
vanhunk

Kenneth Hobs
04-29-2015, 02:04 PM
It is simple enough. Just use example 2 after you modify one line of the HTM file. This is the source line. Just add the full path to the created JPG file rather than using Outlook's relative path. Open the HTM file in Notepad or other text editor, and search for the line with src.

e.g.
<v:imagedata src="C:\Users\ken\AppData\Roaming\Microsoft\Signatures\BCard_files\image001.jpg" o:title="Kenneth Hobson"/>

You may have to reference an external freely available JPG file.

vanhunk
04-30-2015, 01:14 AM
Thank you very much Kenneth,
It is brilliant and works perfectly!
Regards,
vanhunk

Pop Cultured
05-25-2016, 01:39 PM
It is simple enough. Just use example 2 after you modify one line of the HTM file. This is the source line. Just add the full path to the created JPG file rather than using Outlook's relative path. Open the HTM file in Notepad or other text editor, and search for the line with src.

e.g.
<v:imagedata src="C:\Users\ken\AppData\Roaming\Microsoft\Signatures\BCard_files\image001.jpg" o:title="Kenneth Hobson"/>

You may have to reference an external freely available JPG file.

For me, that solution did not work. The images still wouldn't appear. However, I did get it working.
The solution? Add 'file:///' to the beginning of the absolute path.

To use your example, what worked for me was this:
<v:imagedata src="file:///C:\Users\ken\AppData\Roaming\Microsoft\Signatures\BCard_files\image001.jpg" o:title="Kenneth Hobson"/>

An alternate was to remove the C:. This also works, but makes the presumption that the OS is always installed on the C: drive.
<v:imagedata src="\Users\ken\AppData\Roaming\Microsoft\Signatures\BCard_files\image001.jpg" o:title="Kenneth Hobson"/>

Also, don't forget to replace any spaces in the path with %20, else the file will not be found.