Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript to delete existing outlook signatures

Status
Not open for further replies.

SAToronto

IS-IT--Management
Sep 21, 2011
199
CA
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top