{"id":609,"date":"2017-11-24T09:04:23","date_gmt":"2017-11-24T09:04:23","guid":{"rendered":"https:\/\/tech-tipps.de\/?p=609"},"modified":"2023-02-21T09:42:37","modified_gmt":"2023-02-21T08:42:37","slug":"fixit-outlook-vba-code-in-formular-wird-nicht-mehr-ausgefuehrt","status":"publish","type":"post","link":"https:\/\/tech-tipps.de\/?p=609","title":{"rendered":"FixIt: Outlook VBA-Code in Formular wird nicht mehr ausgef\u00fchrt"},"content":{"rendered":"<div class=\"pntrst_main_before_after\"><\/div><p>Hallo allerseits,<\/p>\n<p>heute habe ich ein sehr interessantes FixIt f\u00fcr euch.<\/p>\n<h4>Problem:<\/h4>\n<p>In Outlook (bei mir Version 2016, FixIt gilt aber f\u00fcr die Versionen 2007, 2010, 2013 und 2016) wurde ein benutzerdefiniertes Formular erstellt, in dem VBA-Code\/-Script(s) ausgef\u00fchrt werden soll(en).<\/p>\n<p>Beim Starten des Scripts, zum Beispiel durch Klick auf eine Schaltfl\u00e4che, passiert aber nichts. In meinem Fall hat es schon mal ohne Probleme funktioniert und &#8222;auf einmal&#8220; ging nichts mehr.&nbsp;?<\/p>\n<h4>L\u00f6sung:&nbsp;<!--more--><\/h4>\n<p>Die L\u00f6sung ist relativ einfach &#8230;. zun\u00e4chst aber erst mal der Grund f\u00fcr das oben erl\u00e4uterte Problem:<\/p>\n<p>Im September 2017 wurde ein \u00f6ffentliches Update f\u00fcr Outlook ausgegeben, in dem diese &#8222;Sicherheits-Funktion&#8220; enthalten ist; d. h. die Ausf\u00fchrung von VBA-Scripts wird aus Sicherheitsgr\u00fcnden blockiert, was in unserem Fall \u00e4u\u00dferst ung\u00fcnstig ist, denn <strong>genau das wollen wir ja<\/strong>!<\/p>\n<p>Allerdings kann man diese &#8222;Blockade&#8220; mit Hilfe von Registry-Eintr\u00e4gen wieder aufheben.<\/p>\n<p><strong>Wichtiger Hinweis vorweg<\/strong> (muss sein! ?):<br \/>\n\u00c4nderungen an der Windows-Registrierungsdatenbank k\u00f6nnen Sch\u00e4den am System hervorrufen. Nachfolgendes FixIt f\u00fchrst du auf eigene Verantwortung durch!<\/p>\n<p>Starte den Registry-Editor:<\/p>\n<p><a href=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092214.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-612 alignnone\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092214-202x300.png\" alt=\"\" width=\"202\" height=\"300\" srcset=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092214-202x300.png 202w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092214.png 393w\" sizes=\"auto, (max-width: 202px) 100vw, 202px\" \/><\/a><\/p>\n<p><span style=\"font-size: 1rem;\">Erstelle dann diesen Schl\u00fcssel:<br \/>\n<\/span><b class=\"ocpLegacyBold\" style=\"font-size: 1rem;\"><b class=\"ocpLegacyBold\" style=\"font-size: 1rem;\">bei 32-Bit-Office unter 64-Bit-Windows:<\/b><\/b><i class=\"ocpItalic\" style=\"font-size: 1rem;\"><i class=\"ocpItalic\" style=\"font-size: 1rem;\">HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Office\\16.0\\Outlook\\Security<\/i><\/i><\/p>\n<p><a style=\"font-size: 1rem;\" href=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092657.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-614\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092657-300x107.png\" alt=\"\" width=\"300\" height=\"107\" srcset=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092657-300x107.png 300w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092657.png 570w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><b class=\"ocpLegacyBold\">bei 32-Bit-Office unter 32-Bit-Windows oder 64-Bit-Office unter 64-Bit-Windows:<\/b>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Security<\/p>\n<p>Im gerade erstellten Schl\u00fcssel erstellst du nun einen DWORD-Wert (32 Bit) mit dem Namen <i class=\"ocpItalic\">DisableCustomFormItemScript und dem&nbsp;<\/i>Wert &#8222;0&#8220;<\/p>\n<p><a href=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092455.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-613\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092455-300x78.png\" alt=\"\" width=\"300\" height=\"78\" srcset=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092455-300x78.png 300w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092455-768x200.png 768w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_092455.png 789w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Damit wird die Sperre der Ausf\u00fchrung von Scripts in Formularen (global) aufgehoben.<\/p>\n<p>Nun m\u00fcssen die Formular-Klassen noch explizit aktiviert werden.Dazu musst du erst mal ermitteln, um welche Formular-Klasse es bei dir geht.<br \/>\n\u00d6ffne dein Formular in der Entwicklungsumgebung:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-615\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_093121.png\" alt=\"\" width=\"277\" height=\"135\"><\/p>\n<p>Starte nun die Ver\u00f6ffentlichung des Formulars:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-616\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_093154.png\" alt=\"\" width=\"278\" height=\"140\"><\/p>\n<p>Jetzt wird dir im Speichern-Dialog angezeigt um welche Nachrichten-Klasse<br \/>\nes sich bei deinem Formular handelt:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-617\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_093231-300x53.png\" alt=\"\" width=\"300\" height=\"53\" srcset=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_093231-300x53.png 300w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_093231.png 578w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\nBei mir ist es die Klasse &#8222;IPM.Task.Projekt&#8220;<\/p>\n<p>Um die Scriptausf\u00fchrung f\u00fcr dieses Formular zu aktivieren musst du nun im Regitry-Editor folgenden Schl\u00fcssel anlegen:<\/p>\n<p><b class=\"ocpLegacyBold\">bei 32-Bit-Office unter 64-Bit-Windows:<br \/>\n<\/b><i class=\"ocpItalic\">HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Office\\16.0\\Outlook\\Forms\\TrustedFormScriptList<\/i><\/p>\n<p><b class=\"ocpLegacyBold\">bei 32-Bit-Office unter 32-Bit-Windows oder 64-Bit-Office unter 64-Bit-Windows:<br \/>\n<span style=\"font-size: 1rem; font-weight: 400;\">HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Forms\\TrustedFormScriptList<\/span><br \/>\n<\/b><\/p>\n<p>In diesem Schl\u00fcssel erstellst du nun eine Zeichenfolge mit dem Namen deiner Formularklasse<\/p>\n<p>:<a href=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_094155.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-619\" src=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_094155-300x65.png\" alt=\"\" width=\"300\" height=\"65\" srcset=\"https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_094155-300x65.png 300w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_094155-768x166.png 768w, https:\/\/tech-tipps.de\/wp-content\/uploads\/2017\/11\/2017-11-24_094155.png 835w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Diesen Schritt musst du f\u00fcr jedes deiner Formulare durchf\u00fchren, solltest du mehr als nur das eine haben.<\/p>\n<p>Jetzt Outlook neu starten und die Ausf\u00fchrung des Scripts\/Codes sollte wieder klappen.&nbsp;?<\/p>\n<h4><strong>Hinweis 1:<\/strong><\/h4>\n<p>Im o. g. FixIt wurde in der Registry der Office-Pfad 16.0 verwendet, da es sich um die Office-Version 2016 handelt. Jede Office Version hat seinen eigenen Registry-Pfad.&nbsp;Verwende also 15.0 f\u00fcr Outlook 2013, 14.0 f\u00fcr Outlook 2010 und 12.0 f\u00fcr Outlook 2007.<\/p>\n<h4><strong>Hinweis 2:<\/strong><\/h4>\n<p><span style=\"font-size: 1rem;\">In einigen F\u00e4llen funktioniert Formulare in sekund\u00e4ren Postf\u00e4chern und \u00f6ffentlichen Ordnern nach \u00c4ndern der Registrierungsschl\u00fcsseleinstellungen immer noch nicht. Zum Beheben dieses Problems aktiviere Skripts im&nbsp;<\/span><b class=\"ocpLegacyBold\" style=\"font-size: 1rem;\">Trust Center<\/b><span style=\"font-size: 1rem;\">:<\/span><strong><br \/>\n<\/strong><\/p>\n<p>Klicke auf&nbsp;<b class=\"ocpLegacyBold\">Datei<\/b>&nbsp;&gt;&nbsp;<b class=\"ocpLegacyBold\">Optionen<\/b>. W\u00e4hle dann&nbsp;<b class=\"ocpLegacyBold\">Trust Center<\/b>&nbsp;&gt;&nbsp;<b class=\"ocpLegacyBold\">Einstellungen f\u00fcr das Trust Center<\/b>&gt;&nbsp;<b class=\"ocpLegacyBold\">E-Mail-Sicherheit<\/b>&nbsp;aus.<\/p>\n<p>Klicke im Abschnitt&nbsp;<b class=\"ocpLegacyBold\">Skript in Ordnern<\/b>&nbsp;auf das Kontrollk\u00e4stchen f\u00fcr&nbsp;<b class=\"ocpLegacyBold\">Skript in freigegebenen Ordnern zulassen<\/b>&nbsp;und&nbsp;<b class=\"ocpLegacyBold\">Skript in \u00d6ffentlichen Ordnern zulassen<\/b>, und klicke anschlie\u00dfend auf&nbsp;<b class=\"ocpLegacyBold\">OK&nbsp;<\/b>und nochmals&nbsp;<b class=\"ocpLegacyBold\">OK<\/b>, um die Fenster zu schlie\u00dfen.<\/p>\n<p>&nbsp;<\/p>\n<p>Frage(n)? Dann schreib einen kurzen Kommentar oder erstelle ein Thema dazu im <a href=\"http:\/\/forum.tech-tipps.de\/\" target=\"_blank\" rel=\"noopener\">Tech-Tipps-Forum<\/a> !<\/p>\n<p>&nbsp;<\/p>\n<pre>Quelle: https:\/\/support.office.com\/de-de\/article\/Benutzerdefiniertes-Formularskript-ist-nun-standardm%C3%A4%C3%9Fig-deaktiviert-bd8ea308-733f-4728-bfcc-d7cce0120e94<\/pre>\n<div class=\"pntrst_main_before_after\"><\/div><div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/tech-tipps.de\/?p=609\" action=\"like\" colorscheme=\"light\" layout=\"standard\"  width=\"450px\" size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/tech-tipps.de\/?p=609\" data-type=\"button_count\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Hallo allerseits, heute habe ich ein sehr interessantes FixIt f\u00fcr euch. Problem: In Outlook (bei mir Version 2016, FixIt gilt aber f\u00fcr die Versionen 2007, 2010, 2013 und 2016) wurde ein benutzerdefiniertes Formular erstellt, in dem VBA-Code\/-Script(s) ausgef\u00fchrt werden soll(en). Beim Starten des Scripts, zum Beispiel durch Klick auf eine Schaltfl\u00e4che, passiert aber nichts. In &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tech-tipps.de\/?p=609\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eFixIt: Outlook VBA-Code in Formular wird nicht mehr ausgef\u00fchrt\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-609","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=609"}],"version-history":[{"count":24,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":795,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions\/795"}],"wp:attachment":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}