Ergebnis 1 bis 4 von 4

Thema: Outlook Signaturen mit Active Directory Daten ?

  1. #1
    Registriert seit
    08.12.2003
    Ort
    Wohlenschwil (AG)
    Beiträge
    2.144

    Standard Outlook Signaturen mit Active Directory Daten ?

    Hallo Forum

    Vorhanden ist Exchange 2013 und Outlook 2013.

    Die einfache Variante über den Nachrichten Fluss auf dem Exchange Server hab ich schon erstellt siehe Muster.

    Bin aber noch nicht ganz zufrieden, denn diese funktionieren nur mit HTML Mails. bsp. im GMAIL WEB-Account
    werden die Grafik und der Video Link nicht angezeigt.

    Nun würde ich diese Signatur gerne auf dem Client erstellen und die ADS Daten vom angemeldeten
    Benutzer verwerden. Weiss jemand Rat ?

    ------------- MUSTER ------------------------

    <div style=color:"#A4A4A4">
    <div style=font-size:"10pt">
    <div style=font-family:"Arial">
    <br>
    Mit freundlichen Grüssen<br>
    <br>
    %%LastName%% %%FirstName%%<br>
    %%Title%% %%Department%%<br>
    <br>
    direkt: %%PhoneNumber%%<br>
    <br>
    %%Company%%<br>
    %%Street%%<br>
    %%Country%% %%ZipCode%% %%City%%<br>
    phone: +41 99 999 99 99<br>
    fax: %%FaxNumber%%<br>
    mailto: %%Email%%<br>
    -<br>
    <a href="http://www.publicare.ch" target="http://www.publicare.ch/m/mandanten/130/download/publicare.jpg"<img src="http://www.publicare.ch/m/mandanten/130/download/publicare.jpg" alt="publicare logo">
    &nbsp;
    <a href="http://bcove.me/wsa76jq3" target="_blank"<img src="http://www.publicare.ch/m/mandanten/130/download/video.png" alt="publicare video"><br>


    ------------ MUSTER ENDE ---------------
    rgds Lordicon


    Der einfachste Weg Identitätskrisen zu vermeiden.

    PSS: [Environment]::UserName

    Lordicon [Lord ei-'kän] frei übersetzt "Lord der Ikone"

  2. #2
    Registriert seit
    13.01.2004
    Ort
    Swizzerland
    Alter
    42
    Beiträge
    4.736

    Standard AW: Outlook Signaturen mit Active Directory Daten ?

    Wir haben da irgendwo eine Script-Lösung im Einsatz, wo bei der Anmeldung Daten ausgelesen werden und im entsprechenden File im Benutezrprofil abgespeichert werden. Ich muss mal schauen, ob ich das finde.

  3. #3
    Registriert seit
    13.01.2004
    Ort
    Swizzerland
    Alter
    42
    Beiträge
    4.736

    Standard AW: Outlook Signaturen mit Active Directory Daten ?

    Ich habe das ein VBS gefunden. Funktioniert momentan für Outlook 2010.

    Code:
    ' OUTLOOK-SIGNATUREN AUS ADS ERSTELLEN
    
    On Error Resume Next
    
    Dim qQuery, objSysInfo, objuser
    Dim FullName, EMail, Title, PhoneNumber, MobileNumber, FaxNumber, OfficeLocation, Department
    Dim web_address, FolderLocation, HTMFileString, StreetAddress, Town, State, Company
    Dim ZipCode, PostOfficeBox, UserDataPath
    
    ' Read LDAP(Active Directory) information to asigns the user's info to variables.
    '====================
    Set objSysInfo = CreateObject("ADSystemInfo")
    objSysInfo.RefreshSchemaCache
    qQuery = "LDAP://" & objSysInfo.Username
    Set objuser = GetObject(qQuery)
    
    FullName = objuser.givenName & " " & objuser.sn 
    EMail = lcase(objuser.mail)
    
    If not objuser.Title = "" then
    	Title = objuser.Title
    else
    	title = ""
    end If
    
    'Title = objuser.title
    
    If not objuser.TelephoneNumber = "" then
    	PhoneNumber = objuser.TelephoneNumber
    else
    	PhoneNumber = "+41 12 345 67 89"
    End If
    If not objuser.facsimileTelephoneNumber = "" then
    	FaxPhoneNumber = objuser.facsimileTelephoneNumber
    else
    	FaxPhoneNumber = "+41 12 345 67 89"
    'End If
    
    OfficeLocation = objuser.physicalDeliveryOfficeName
    StreetAddress = objuser.streetaddress
    PostofficeBox = objuser.postofficebox
    Department = objUser.title
    ZipCode = objuser.postalcode
    Town = objuser.l
    
    webaddress = "www.url.ch"
    address1 = "Firma"
    address2 = "Abteilung"
    address3 = "Unterabteilung"
    address4 = "Unterunterabteilung"
    address5 = "Strasse"
    address6 = "xxx Ortschaft"
    
    ' This section creates the signature files names and locations.
    '====================
    ' Corrects Outlook signature folder location. Just to make sure that
    ' Outlook is using the purposed folder defined with variable : FolderLocation
    ' Example is based on Dutch version.
    ' Changing this in a production enviremont might create extra work
    ' all employees are missing their old signatures
    '====================
    Dim objShell, RegKey, RegKeyParm
    Set objShell = CreateObject("WScript.Shell")
    RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\General"
    RegKey = RegKey & "\Signatures"
    objShell.RegWrite RegKey , "FirmaSig"
    UserDataPath = ObjShell.ExpandEnvironmentStrings("%appdata%")
    FolderLocation = UserDataPath &"\Microsoft\FirmaSig\"
    HTMFileString = FolderLocation & "FirmaSig.htm"
    
    ' This section disables the change of the signature by the user.
    '====================
    objShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Common\MailSettings\NewSignature"
    objShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Common\MailSettings\ReplySignature"
    objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002\New Signature", "FirmaSig" 
    objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002\Reply-Forward Signature", "FirmaSig" 
    
    ' objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\MailSettings\NewSignature" , "FirmaSig"
    ' objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\MailSettings\ReplySignature" , "FirmaSig"
    ' objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Options\Mail\EnableLogging" , "0", "REG_DWORD"
    
    ' This section checks if the signature directory exits and if not creates one.
    '====================
    Dim objFS1
    Set objFS1 = CreateObject("Scripting.FileSystemObject")
    If (objFS1.FolderExists(FolderLocation)) Then
    Else
    Call objFS1.CreateFolder(FolderLocation)
    End if
    
    ' The next section builds the signature file
    '====================
    Dim objFSO
    Dim objFile,afile
    Dim aQuote
    aQuote = chr(34)
    
    ' This section builds the HTML file version
    '====================
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    
    ' This section deletes to other signatures.
    ' These signatures are automaticly created by Outlook 2003/2007.
    '====================
    Set AFile = objFSO.GetFile(Folderlocation & "FirmaSig.rtf")
    'aFile.Delete
    Set AFile = objFSO.GetFile(Folderlocation & "FirmaSig.txt")
    'aFile.Delete
    
    Set objFile = objFSO.CreateTextFile(HTMFileString,True)
    objFile.Close
    Set objFile = objFSO.OpenTextFile(HTMFileString, 2)
    
    objfile.write "<!DOCTYPE HTML PUBLIC " & aQuote & "-//W3C//DTD HTML 4.0 Transitional//EN" & aQuote & ">" & vbCrLf
    objfile.write "<HTML><HEAD><TITLE>Microsoft Office Outlook Signature</TITLE>" & vbCrLf
    objfile.write "<META http-equiv=Content-Type content=" & aQuote & "text/html; charset=windows-1252" & aQuote & ">" & vbCrLf
    objfile.write "<META content=" & aQuote & "MSHTML 6.00.3790.186" & aQuote & " name=GENERATOR>" & vbCrLf
    
    objfile.write "<style type=" & aQuote & "text/css" & aQuote & ">" & vbCrLf
    objfile.write "<!--" & vbCrLf
    objfile.write ".style1 {font-size: 10pt;font-family: Arial, Helvetica, sans-serif}" & vbCrLf
    objfile.write ".style2 {font-size: 12pt; font-family: Arial, Helvetica, sans-serif}" & vbCrLf
    objfile.write ".style3 {font-size: 8pt; font-family: Arial, Helvetica, sans-serif}" & vbCrLf
    objfile.write "-->" & vbCrLf
    objfile.write "</style>" & vbCrLf
    objfile.write "</HEAD>" & vbCrLf
    
    objfile.write "<BODY link=#FFFFFF alink=#FFCC00 vlink=#FFFFFF>" & vbCrLf
    objfile.write "<p class=" & aQuote & "style1" & aQuote & ">Freundliche Grüsse<br>" & vbCrLf
    objfile.write FullName & "<br>" & vbCrLf
    objfile.write Department & "</p>" & vbCrLf
    objfile.write "<p class=" & aQuote & "style3" & aQuote & ">T " & PhoneNumber & "<br />" & vbCrLf
    objfile.write "F " & FaxPhoneNumber & "<br />" & vbCrLf
    objfile.write Email & "<br />" & vbCrLf
    objfile.write webaddress & "</p>" & vbCrLf
    objfile.write "<p class=" & aQuote & "style3" & aQuote & ">" & address1 & "<br />" & vbCrLf
    objfile.write address2 & "<br />" & vbCrLf
    objfile.write address3 & "<br />" & vbCrLf
    objfile.write address4 & "<br />" & vbCrLf
    objfile.write address5 & "<br />" & vbCrLf
    objfile.write address6 & "</span></p>" & vbCrLf
    'objfile.write "<p>&nbsp;</p>" & vbCrLf
    objfile.write "<p><a href=http://www.url.ch><img src=\\Server\Data\Bild_Signatur_klein.jpg width=96 height=70 border=0 alt=Logo></a></p>" & vbCrLf
    objfile.write "<p>&nbsp;</p>" & vbCrLf
    objfile.write "<p>&nbsp;</p>" & vbCrLf
    objfile.write "</BODY></HTML>" & vbCrLf
    
    objFile.Close
    
    ' ===========================
    ' This section readsout the current Outlook profile and then sets the name of the default Signature
    ' ===========================
    ' Use this version to set all accounts
    ' in the default mail profile
    ' to use a previously created signature
    
    Call SetDefaultSignature("FirmaSig","")
    
    ' Use this version (and comment the other) to
    ' modify a named profile.
    ' Call SetDefaultSignature _
    ' ("Signature Name", "Profile Name")
    
    Sub SetDefaultSignature(strSigName, strProfile)
    Const HKEY_CURRENT_USER = &H80000001
    strComputer = "."
    
    If Not IsOutlookRunning Then
    Set objreg = GetObject("winmgmts:" & _
    "{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    strKeyPath = "Software\Microsoft\Windows NT\" & _
    "CurrentVersion\Windows " & _
    "Messaging Subsystem\Profiles\"
    ' get default profile name if none specified
    If strProfile = "" Then
    objreg.GetStringValue HKEY_CURRENT_USER, _
    strKeyPath, "DefaultProfile", strProfile
    End If
    ' build array from signature name
    myArray = StringToByteArray(strSigName, True)
    strKeyPath = strKeyPath & strProfile & _
    "\9375CFF0413111d3B88A00104B2A6676"
    objreg.EnumKey HKEY_CURRENT_USER, strKeyPath, _
    arrProfileKeys
    For Each subkey In arrProfileKeys
    strsubkeypath = strKeyPath & "\" & subkey
    objreg.SetBinaryValue HKEY_CURRENT_USER, _
    strsubkeypath, "New Signature", myArray
    objreg.SetBinaryValue HKEY_CURRENT_USER, _
    strsubkeypath, "Reply-Forward Signature", myArray
    Next
    Else
    strMsg = "Please shut down Outlook before " & _
    "running this script."
    'MsgBox strMsg, vbExclamation, "SetDefaultSignature"
    End If
    End Sub
    
    Function IsOutlookRunning()
    strComputer = "."
    strQuery = "Select * from Win32_Process " & _
    "Where Name = 'Outlook.exe'"
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
    Set colProcesses = objWMIService.ExecQuery(strQuery)
    For Each objProcess In colProcesses
    If UCase(objProcess.Name) = "OUTLOOK.EXE" Then
    IsOutlookRunning = True
    Else
    IsOutlookRunning = False
    End If
    Next
    End Function
    
    Public Function StringToByteArray _
    (Data, NeedNullTerminator)
    Dim strAll
    strAll = StringToHex4(Data)
    If NeedNullTerminator Then
    strAll = strAll & "0000"
    End If
    intLen = Len(strAll) \ 2
    ReDim arr(intLen - 1)
    For i = 1 To Len(strAll) \ 2
    arr(i - 1) = CByte _
    ("&H" & Mid(strAll, (2 * i) - 1, 2))
    Next
    StringToByteArray = arr
    End Function
    
    Public Function StringToHex4(Data)
    ' Input: normal text
    ' Output: four-character string for each character,
    ' e.g. "3204" for lower-case Russian B,
    ' "6500" for ASCII e
    ' Output: correct characters
    ' needs to reverse order of bytes from 0432
    Dim strAll
    For i = 1 To Len(Data)
    ' get the four-character hex for each character
    strChar = Mid(Data, i, 1)
    strTemp = Right("00" & Hex(AscW(strChar)), 4)
    strAll = strAll & Right(strTemp, 2) & Left(strTemp, 2)
    Next
    StringToHex4 = strAll
    End Function

  4. #4
    Registriert seit
    08.12.2003
    Ort
    Wohlenschwil (AG)
    Beiträge
    2.144

    Standard AW: Outlook Signaturen mit Active Directory Daten ?

    Schau ich mir dann in Ruhe an.

    Ist ja etwas umfangreicher.
    rgds Lordicon


    Der einfachste Weg Identitätskrisen zu vermeiden.

    PSS: [Environment]::UserName

    Lordicon [Lord ei-'kän] frei übersetzt "Lord der Ikone"

Ähnliche Themen

  1. Active Directory Delegation mit BUILTIN Gruppen
    Von TheDonMiguel im Forum Software: Windows, Apple, Linux...
    Antworten: 2
    Letzter Beitrag: 12.03.2006, 13:41
  2. Probelm mit Active Directory
    Von Netgearer im Forum Software: Windows, Apple, Linux...
    Antworten: 16
    Letzter Beitrag: 17.03.2005, 22:29
  3. Versteckte Suche: Active Directory mit Windows XP durchsuchen
    Von Trainer im Forum Software: Windows, Apple, Linux...
    Antworten: 2
    Letzter Beitrag: 17.02.2005, 09:07
  4. Access Point in Active Directory aufnehmen mit 2003 Server
    Von kaspar im Forum Software: Windows, Apple, Linux...
    Antworten: 1
    Letzter Beitrag: 23.12.2003, 12:51
  5. Active Directory mit ASP
    Von Cello im Forum Software: Windows, Apple, Linux...
    Antworten: 6
    Letzter Beitrag: 23.12.2003, 12:49

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  
BigBellyBank.shop