I have created a script that will add a new deault signature for both new emails and reply/fwd
Can anyone tell me what I need to add to delete any existing signatures before it creates the 2 new signatures
Here is the top bit of my code
On Error Resume Next
Const WdLineBreak = 6
Dim intLen
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.Title
strMobile = objuser.mobile
strEmail = objUser.mail
strPhone = objuser.telephoneNumber
strCred = objuser.info
strHome = objuser.homephone
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
' Don't use extra spaces at all
objSelection.ParagraphFormat.SpaceAfter = 0
objSelection.Font.Size = "12"
objSelection.Font.Name = "Arial"
objSelection.Font.Bold = True
objSelection.Font.color = RGB(148,137,131)
objSelection.TypeText "S"
objSelection.Font.Size = "12"
objSelection.Font.Name = "Arial"
objSelection.Font.Bold = True
objSelection.Font.color = RGB(234,118,31)
Can anyone tell me what I need to add to delete any existing signatures before it creates the 2 new signatures
Here is the top bit of my code
On Error Resume Next
Const WdLineBreak = 6
Dim intLen
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.Title
strMobile = objuser.mobile
strEmail = objUser.mail
strPhone = objuser.telephoneNumber
strCred = objuser.info
strHome = objuser.homephone
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
' Don't use extra spaces at all
objSelection.ParagraphFormat.SpaceAfter = 0
objSelection.Font.Size = "12"
objSelection.Font.Name = "Arial"
objSelection.Font.Bold = True
objSelection.Font.color = RGB(148,137,131)
objSelection.TypeText "S"
objSelection.Font.Size = "12"
objSelection.Font.Name = "Arial"
objSelection.Font.Bold = True
objSelection.Font.color = RGB(234,118,31)