On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set WshShell = CreateObject("WScript.Shell")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
'------------AD LINK INFO-----------------------------------------------------------------------------
strName = objUser.FullName
strTitle = objUser.Description
strCred = objUser.info
strStreet = objUser.StreetAddress
StrPC = objUser.PostalCode
strLocation = objUser.l
strPostCode = objUser.PostalCode
strPhone = objUser.TelephoneNumber
strMobile = objUser.Mobile
strFax = objUser.FacsimileTelephoneNumber
strEmail = objUser.mail
'------------AD LINK INFO------------------------------------------------------------------------------
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
'------------HANDTEKENING PERSONEELS INFO--------------------------------------------------------------
objSelection.Font.Color = RGB(0,0,0)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 10
objSelection.TypeText "Met vriendelijke groet,"
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText "<bedrijfsnaam>"
objSelection.TypeText Chr(11)
if (strCred) Then objSelection.TypeText strName & ", " & strCred Else objSelection.TypeText strName
objSelection.TypeText Chr(11)
objSelection.TypeText strTitle
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText strStreet
objSelection.TypeText Chr(11)
objSelection.TypeText strPC
objSelection.TypeText " "
objSelection.TypeText strLocation
objSelection.TypeText Chr(11)
objSelection.Font.Color = RGB(217,3,39)
objSelection.TypeText "T"
objSelection.TypeText vbTab
objSelection.Font.Color = RGB(0,0,0)
objSelection.TypeText strPhone
objSelection.TypeText Chr(11)
objSelection.Font.Color = RGB(217,3,39)
if (strMobile) Then objSelection.TypeText "M"
objSelection.TypeText vbTab
objSelection.Font.Color = RGB(0,0,0)
if (strMobile) Then objSelection.TypeText strMobile
if (strMobile) Then objSelection.TypeText Chr(11)
objSelection.Font.Color = RGB(217,3,39)
objSelection.TypeText "E"
objSelection.TypeText vbTab
objSelection.Font.Color = RGB(0,0,0)
Set hyp=objSelection. Hyperlinks. Add (objSelection. Range, "mailto:" & strEmail,,, strEmail)
hyp. Range. Font. Size="10"
hyp. Range. Font. Underline = False
hyp. Range. Font. Color=RGB(0,0,0)
hyp. Range. Font. Name="Arial"
'objSelection. Hyperlinks. Add objSelection. range, "mailto:" & strEmail,,, strEmail
objSelection.TypeText Chr(11)
objSelection.Font.Color = RGB(217,3,39)
objSelection.TypeText "I"
objSelection.TypeText Chr(9)
objSelection.Font.Color = RGB(0,0,0)
Set hyp=objSelection. Hyperlinks. Add (objSelection. Range, "<bedrijfsnaam>",,, "www.bedrijf.nl")
hyp. Range. Font. Size="10"
hyp. Range. Font. Underline = False
hyp. Range. Font. Color=RGB(0,0,0)
hyp. Range. Font. Name="Arial"
'objSelection. Hyperlinks. Add objSelection. Range, "<bedrijfsnaam>",,, "www.bedrijf.nl")
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
'------------HANDTEKENING PERSONEELS INFO--------------------------------------------------------------