diff --git a/Anleitung.txt b/Anleitung.txt index 4a37543..69a9357 100644 --- a/Anleitung.txt +++ b/Anleitung.txt @@ -4,6 +4,16 @@ Ordner ohne_KontaktBild öffnen. Rechtsklick auf ohne_KontaktBild.ps1 Datei -> Mit Powershell ausführen +Gesamten Inhalt der angezeigten Seite markieren und Rechtsklick kopieren. + +Neue Signatur anlegen: + +In Outlook (Classic) -> Datei -> Optionen -> E-Mail -> Signaturen -> Neu + +Im Textfeld -> Strg + V + +Speichern + Wenn neue Signatur als Standard Signatur im Outlook gewünscht ist: In Outlook (Classic) -> Datei -> Optionen -> E-Mail -> Signaturen -> Neue Nachrichten -> (erstellte Signatur auswählen) @@ -11,8 +21,4 @@ In Outlook (Classic) -> Datei -> Optionen -> E-Mail -> Signaturen -> Neue Nachri Für Signatur mit Kontaktbild: -Ordner mit_KontaktBild öffnen. - -Rechtsklick auf mit_KontaktBild.ps1 Datei -> Mit Powershell ausführen - -Danach Bitte subcura kontaktieren. \ No newline at end of file +Bitte subcura kontaktieren. \ No newline at end of file diff --git a/KontaktBild.JPG b/KontaktBild.JPG new file mode 100644 index 0000000..3e5a30e Binary files /dev/null and b/KontaktBild.JPG differ diff --git a/WIP-Dresden GmbH.html b/WIP-Dresden GmbH.html index 9067614..9f0a282 100644 --- a/WIP-Dresden GmbH.html +++ b/WIP-Dresden GmbH.html @@ -4,7 +4,6 @@
|
- |
diff --git a/mit_KontaktBild.ps1 b/mit_KontaktBild.ps1 index 32816aa..a4e2d4a 100644 --- a/mit_KontaktBild.ps1 +++ b/mit_KontaktBild.ps1 @@ -1,10 +1,6 @@ -# Quellordner -$SourceFolder = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\mit_KontaktBild\Signatur" - -# Zielordner Outlook Signaturen -$TargetFolder = "$env:APPDATA\Microsoft\Signatures" - -Copy-Item -Path "$SourceFolder\*" -Destination $TargetFolder -Recurse -Force +$Base64 = Read-Host + +$HtmlLine = "'data:image/jpeg;base64,$Base64'" $UserName = $env:USERNAME @@ -28,13 +24,20 @@ $Telefon = $props["telephonenumber"][0] $Mail = $props["mail"][0] # Signaturpfad -$File = "$env:APPDATA\Microsoft\Signatures\WIP-Dresden GmbH.htm" +$File = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\mit_KontaktBild\WIP-Dresden GmbH.html" $html = Get-Content $File -Raw +$html = $html.Replace("{BEN_AD_CONTACTPICTURE}", $HtmlLine) $html = $html.Replace("{BEN_NAME}", $DisplayName) $html = $html.Replace("{BEN_POSITION}", $Position) $html = $html.Replace("{BEN_TelefonBuero}", $Telefon) $html = $html.Replace("{BEN_email}", $Mail) -Set-Content -Path $File -Value $html -Encoding UTF8 \ No newline at end of file +$TempFile = "$env:TEMP\signature_preview.html" + +# schreiben +Set-Content -Path $TempFile -Value $html -Encoding UTF8 + +# anzeigen +Start-Process $TempFile \ No newline at end of file diff --git a/ohne_KontaktBild.ps1 b/ohne_KontaktBild.ps1 index 0c1bd11..003ce07 100644 --- a/ohne_KontaktBild.ps1 +++ b/ohne_KontaktBild.ps1 @@ -1,12 +1,4 @@ -# Quellordner -$SourceFolder = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\ohne_KontaktBild\Signatur" - -# Zielordner Outlook Signaturen -$TargetFolder = "$env:APPDATA\Microsoft\Signatures" - -Copy-Item -Path "$SourceFolder\*" -Destination $TargetFolder -Recurse -Force - -$UserName = $env:USERNAME +$UserName = $env:USERNAME $root = [ADSI]"LDAP://RootDSE" $base = "LDAP://$($root.defaultNamingContext)" @@ -28,7 +20,7 @@ $Telefon = $props["telephonenumber"][0] $Mail = $props["mail"][0] # Signaturpfad -$File = "$env:APPDATA\Microsoft\Signatures\WIP-Dresden GmbH.htm" +$File = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\ohne_KontaktBild\WIP-Dresden GmbH.html" $html = Get-Content $File -Raw @@ -37,4 +29,10 @@ $html = $html.Replace("{BEN_POSITION}", $Position) $html = $html.Replace("{BEN_TelefonBuero}", $Telefon) $html = $html.Replace("{BEN_email}", $Mail) -Set-Content -Path $File -Value $html -Encoding UTF8 \ No newline at end of file +$TempFile = "$env:TEMP\signature_preview.html" + +# schreiben +Set-Content -Path $TempFile -Value $html -Encoding UTF8 + +# anzeigen +Start-Process $TempFile \ No newline at end of file |