Set objSysInfo = CreateObject("ADSystemInfo")
Set WshShell = CreateObject("WScript.Shell")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.Title
strDepartment = objUser.Department
strCred = objUser.info
strStreet = objUser.StreetAddress
strLocation = objUser.l
strPostCode = objUser.PostalCode
strPhone = objUser.TelephoneNumber
strMobile = objUser.Mobile
strOtherMobile = objUser.OtherMobile
strFax = objUser.FacsimileTelephoneNumber
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.TypeParagraph()
objSelection.Font.Size = 14
objSelection.Font.Bold = True
objSelection.Font.Size = 12
objSelection.Typetext "<font color='red'>" ----不行
objSelection.TypeText strTitle
objSelection.Typetext "</font>"
我要如何设置它为HTML格式,另外,想对其中的 Title 的字体颜色设为红色,要如何设置呢?
试了多种方法直接<font color='red'></font> 出来的结果仍然是<font color='red'>...</font>
也 试了 objSelection.Font.ColorIndex=3 也不行。
请高手指教,谢谢