tags:

views:

1267

answers:

1

I would like to know how to write a macro that would send an email attachment in excel with user's signature. The same macro would be used by different users. So it should dynamically read any one (out of multiple html, rtf and txt files) signature file from user's location C:\Documents and Settings\" & Environ("username") "\Application Data\Microsoft\Signatures[user file]" OR Environ("APPDATA") & "\Microsoft\Signatures\" and send email with that particular user's signature.

Please guide me as how this could be achieved.

+1  A: 

If you intend to use Outlook automation and Windows XP, it is possible to read the signature from:

C:\Documents and Settings\\Application Data\Microsoft\Signatures

You will find three files:

.htm (HTML)
.rtf (Rich Text)
.txt (Plain Text)

You can use Environment variables to get the current user and the FileSystemObject to read in the file.

Remou