I mutilated a script to make it run on my system but i am not a coder and don't normally have anything to do with scripting. It is working perfectly on the 2003 machines but not on the 2000 machines. I just wanted to check with someone who scripts whether this is because of a difference between 2003 and 2000 or something else I have yet to figure out the script isnt running on the 2000 machines even though the folder structure for signatures is the same. this is the script (**** denotes company addresses/names):
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strDepartment = objUser.description
strCompany = objUser.Company
strPhone = objUser.homephone
strFax = objUser.facsimiletelephoneNumber
strMobile = objUser.Mobile
strMail = objUser.mail
strStreet = objUser.streetAddress
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "10"
objSelection.Font.Bold = True
objSelection.TypeText strName
objSelection.TypeParagraph()
objSelection.Font.Bold = False
objSelection.TypeText strDepartment
objSelection.TypeParagraph()
objSelection.TypeText strCompany
objSelection.TypeParagraph()
objSelection.TypeText strStreet
objSelection.TypeParagraph()
objSelection.TypeParagraph()
if strPhone <> "" then
objSelection.TypeText "[T] " + strPhone
objSelection.TypeParagraph()
end if
if strFax <> "" then
objSelection.TypeText "[F] " + strFax
objSelection.TypeParagraph()
end if
if strMobile <> "" then
objSelection.TypeText "[M] " + strMobile
objSelection.TypeParagraph()
end if
objSelection.TypeParagraph()
objSelection.typeText "
Set objSelection = objDoc.Range()
objSignatureEntries.Add "****", objSelection
objSignatureObject.NewMessageSignature = "****"
objSignatureObject.ReplyMessageSignature = "****"
objDoc.Saved = True
objWord.Quit
if anyone could have a quick look i would be most grateful.
thanks
naomi
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strDepartment = objUser.description
strCompany = objUser.Company
strPhone = objUser.homephone
strFax = objUser.facsimiletelephoneNumber
strMobile = objUser.Mobile
strMail = objUser.mail
strStreet = objUser.streetAddress
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "10"
objSelection.Font.Bold = True
objSelection.TypeText strName
objSelection.TypeParagraph()
objSelection.Font.Bold = False
objSelection.TypeText strDepartment
objSelection.TypeParagraph()
objSelection.TypeText strCompany
objSelection.TypeParagraph()
objSelection.TypeText strStreet
objSelection.TypeParagraph()
objSelection.TypeParagraph()
if strPhone <> "" then
objSelection.TypeText "[T] " + strPhone
objSelection.TypeParagraph()
end if
if strFax <> "" then
objSelection.TypeText "[F] " + strFax
objSelection.TypeParagraph()
end if
if strMobile <> "" then
objSelection.TypeText "[M] " + strMobile
objSelection.TypeParagraph()
end if
objSelection.TypeParagraph()
objSelection.typeText "
Set objSelection = objDoc.Range()
objSignatureEntries.Add "****", objSelection
objSignatureObject.NewMessageSignature = "****"
objSignatureObject.ReplyMessageSignature = "****"
objDoc.Saved = True
objWord.Quit
if anyone could have a quick look i would be most grateful.
thanks
naomi