J
Jamie
Hello there,
I'm having difficulty getting Arial as my font. It works well using Word as
mail editor, but I cannot use this as it has an unrelated issue. Font
defaults to Times New Roman - Any other Font works (eg Arial Narrow).
Also is there a way to get rid of the double line spacing?
Again, this does not happen using Word as the editor.
All signature text is picked up from the Notes field (under telephone tab in
AD) only - "strInfo".
Many thanks for any help/advice.
- SCRIPT -
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strInfo = objUser.Info
Set objWord = GetObject(, "Word.Application")
If objWord Is Nothing Then
Set objWord = CreateObject("Word.Application")
blnWeOpenedWord = True
End If
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObjects = objWord.EmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObjects.EmailSignatureEntries
objSelection.Font.Size = "10"
objSelection.Font.Name = "arial"
objSelection.Font.Bold = true
objSelection.font.Color= vbBlue
objSelection.TypeText strInfo
Set objSelection = objDoc.Range()
objSignatureEntries.Add "AD Signature", objSelection
objSignatureObjects.NewMessageSignature = "AD Signature"
'objSignatureObjects.ReplyMessageSignature = "AD Signature"
objDoc.Close 0
If blnWeOpenedWord Then
objWord.Quit
End If
I'm having difficulty getting Arial as my font. It works well using Word as
mail editor, but I cannot use this as it has an unrelated issue. Font
defaults to Times New Roman - Any other Font works (eg Arial Narrow).
Also is there a way to get rid of the double line spacing?
Again, this does not happen using Word as the editor.
All signature text is picked up from the Notes field (under telephone tab in
AD) only - "strInfo".
Many thanks for any help/advice.
- SCRIPT -
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strInfo = objUser.Info
Set objWord = GetObject(, "Word.Application")
If objWord Is Nothing Then
Set objWord = CreateObject("Word.Application")
blnWeOpenedWord = True
End If
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObjects = objWord.EmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObjects.EmailSignatureEntries
objSelection.Font.Size = "10"
objSelection.Font.Name = "arial"
objSelection.Font.Bold = true
objSelection.font.Color= vbBlue
objSelection.TypeText strInfo
Set objSelection = objDoc.Range()
objSignatureEntries.Add "AD Signature", objSelection
objSignatureObjects.NewMessageSignature = "AD Signature"
'objSignatureObjects.ReplyMessageSignature = "AD Signature"
objDoc.Close 0
If blnWeOpenedWord Then
objWord.Quit
End If