Hi there, I found and edited slightly a script that creates a default
outlook signature by pulling in AD info, and adding a text disclaimer. I
need to add an image
(company logo) but dont know how to go about it, please help!! Here is the
script so far;


Set objUser = CreateObject("WScript.Network")
userName = objUser.UserName
domainName = objUser.UserDomain

FUNCTION GetUserDN(BYVAL UN, BYVAL DN)
Set ObjTrans = CreateObject("NameTranslate")
objTrans.init 1, DN
objTrans.set 3, DN & "\" & UN
strUserDN = objTrans.Get(1)
GetUserDN = strUserDN
END FUNCTION

Set objLDAPUser = GetObject("LDAP://" & GetUserDN(userName,domainName))

'Prepare to create some files
Dim objFSO, objWsh, appDataPath, pathToCopyTo, plainTextFile,
plainTextFilePath, richTextFile, richTextFilePath, htmlFile, htmlFilePath
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWsh = CreateObject("WScript.Shell")
appDataPath = objWsh.ExpandEnvironmentStrings("%APPDATA%")
pathToCopyTo = appDataPath & "\Microsoft\Signatures\"

'Let's create the plain text signature
plainTextFilePath = pathToCopyTo & "Default.txt"
Set plainTextFile = objFSO.CreateTextFile(plainTextFilePath, TRUE)
plainTextFile.WriteLine("-- ")
plainTextFile.WriteLine(objLDAPUser.DisplayName)
plainTextFile.WriteLine(objLDAPUser.title)
plainTextFile.WriteLine(objLDAPUser.company)
plainTextFile.WriteLine("t: " & objLDAPUser.telephoneNumber)
plainTextFile.WriteLine("f: " & objLDAPUser.facsimileTelephoneNumber)
plainTextFile.Write("w: " & objLDAPUser.wWWHomePage)
plainTextFile.Write(" ")
plainTextFile.WriteLine("Streeter Marshall is regulated by the Solicitors
Regulation Authority. A list of the Partners is available from 74 High
Street, Croydon CR9 2UU. Information in this message is confidential and
may be legally privileged. If you are not the intended recipient, please
notify the sender, and please delete the message from your system
immediately.")
plainTextFile.Close

'Now we create the Rich Text signature
richTextFilePath = pathToCopyTo & "Default.rtf"
Set richTextFile = objFSO.CreateTextFile(richTextFilePath, TRUE)
richTextFile.WriteLine("{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fswiss\fcharset0
calibri;}}")
richTextFile.WriteLine("\viewkind4\uc1\pard\f0\fs20 \par")
richTextFile.WriteLine ("\b")
richTextFile.WriteLine(objLDAPUser.DisplayName & "\par")
richTextFile.WriteLine ("\b0")
richTextFile.WriteLine(objLDAPUser.title & "\par")
richTextFile.WriteLine ("\line")
richTextFile.WriteLine
("________________________________________________________________________________________________________________________________________________")
richTextFile.WriteLine ("\line")
richTextFile.WriteLine ("\line")
richTextFile.WriteLine(objLDAPUser.company & "\par")
richTextFile.WriteLine (objLDAPUser.streetAddress & "\par")
richTextFile.WriteLine("t: " & objLDAPUser.telephoneNumber & " f: " &
objLDAPUser.facsimileTelephoneNumber & " dx: "& objLDAPUser.postalCode &
"\par")
richTextFile.WriteLine("w: " & objLDAPUser.wWWHomePage & "\par")
richTextFile.WriteLine ("\line")
richTextFile.WriteLine("Streeter Marshall is regulated by the Solicitors
Regulation Authority. A list of the Partners is available from 74 High
Street, Croydon CR9 2UU. Information in this message is confidential and
may be legally privileged. If you are not the intended recipient, please
notify the sender, and please delete the message from your system
immediately.")
richTextFile.Write("}")
richTextFile.Close

'And finally, the HTML signature
htmlFilePath = pathToCopyTo & "Default.htm"
Set htmlFile = objFSO.CreateTextFile(htmlFilePath, TRUE)
htmlfile.WriteLine("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0
Transitional//EN""
""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">")
htmlfile.WriteLine("<html xmlns=""http://www.w3.org/1999/xhtml"" >")
htmlfile.WriteLine("<body>")
htmlfile.WriteLine("<div style=""font-size:10pt; font-family:'Calibri';"">")
htmlfile.WriteLine("<div>-- </div>")
htmlfile.WriteLine("<div>" & objLDAPUser.DisplayName & "</div>")
htmlfile.WriteLine("<div>" & objLDAPUser.title & "</div>")
htmlfile.WriteLine("<div>" & objLDAPUser.company & "</div>")
htmlfile.WriteLine("<div>t: " & objLDAPUser.telephoneNumber & "</div>")
htmlfile.WriteLine("<div>f: " & objLDAPUser.facsimileTelephoneNumber &
"</div>")
htmlfile.WriteLine("<div>w: <a href=""http://" & objLDAPUser.wWWHomePage &
""">" & objLDAPUser.wWWHomePage & "</a></div>")
htmlfile.WriteLine("<h1>testing</h1>")
htmlfile.WriteLine("</div>")
htmlfile.WriteLine("</html>")


Thanks,

Al