|
Hi Guys,
I was wondering if you could help me.... My boss has very kindly sent me a file he created for out new email signatures in Outlook 2003. He wants me to roll this out using kix and I believe we need to convert this or call it as a seperate file.
Can anyone point me in the right direction, I'm not very good a scripting though :o/
Here is the text below he wants me to roll out using kix...
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\"
'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:12pt;font-weight:'700';font-family:'Arial'; color:'gray';"">") htmlfile.WriteLine("<div>" & objLDAPUser.DisplayName & "</div>") htmlfile.WriteLine("<div style=""font-size:12pt;font-weight:'normal';font-family:'Arial'; color:'gray';"">") htmlfile.WriteLine("<div>" & objLDAPUser.title & "</div>") htmlfile.WriteLine("<span style=""font-size:12pt; font-family:'Arial','helvetica';color:'white';"">BLANKLINE</span><P>") htmlfile.WriteLine("<div style=""font-size:14pt;font-weight:'normal'; font-family:'Arial'; color:'gray';"">") htmlfile.WriteLine("<div>" & objLDAPUser.company & "</div>") htmlfile.WriteLine("<span style=""font-size:7.5pt; font-family:'Arial','helvetica';color:'gray';"">Design Architecture Masterplanning Interiors Graphics</span><P>") htmlfile.WriteLine("<span style=""font-size:8pt; font-family:'Arial','helvetica';color:'gray';"">Winner – Queen’s Award for Enterprise: International Trade 2008 </span>") htmlfile.WriteLine("<div style=""font-size:8pt; font-family:'Arial'; color:'gray';"">") htmlfile.WriteLine("<div>T: " & objLDAPUser.telephoneNumber & "</div>") htmlfile.WriteLine("<div>F: " & objLDAPUser.facsimileTelephoneNumber & "</div>") htmlfile.WriteLine("<span style=""font-size:12pt; font-family:'Arial','helvetica';color:'white';"">BLANKLINE</span><P>") htmlfile.WriteLine("<div style=""font-size:9pt; font-family:'Arial'; color:'gray';"">") htmlfile.WriteLine("<div> <a href=""http://" & objLDAPUser.wWWHomePage & """>" & objLDAPUser.wWWHomePage & "</a></div>") htmlfile.WriteLine("<span style=""font-size:12pt; font-family:'Arial','helvetica';color:'white';"">BLANKLINE</span><P>") htmlfile.WriteLine("</div>") htmlfile.WriteLine("<span style=""font-size:18pt; color:'#33CCCC'; font-family:'Webdings','helvetica';"">P </span><span style=""font-size:7.5pt; font-family:'Arial','helvetica';color:'#33CCCC';"">Please consider the environment before printing this e-mail. </span>") htmlfile.WriteLine("</body>") htmlfile.Write("</html>")
To see if it would work, it was a high hope though, I put this into Kix and I get an error message,
ERROR : error in parameterdefinition of [getuserdn]! Script: T:\bny_email.kix
This is due to the first line of text I know but if anyone can point me in the right direction that would be great. Im not sure how I go about creating a new one from scratch even though I have read the email signature topics in here...
Thanks a lot...
Lara 'A not very good at scripting' IT person...
|