{"id":578,"date":"2009-10-16T15:52:08","date_gmt":"2009-10-16T13:52:08","guid":{"rendered":"https:\/\/www.peppercrew.nl\/?p=578"},"modified":"2011-05-19T14:54:13","modified_gmt":"2011-05-19T13:54:13","slug":"macro-security-vba-error-in-sequence","status":"publish","type":"post","link":"https:\/\/ingmarverheij.com\/en\/macro-security-vba-error-in-sequence\/","title":{"rendered":"Macro security \/ VBA error in sequence"},"content":{"rendered":"<p>Today I had to solve a problem with multiple (Softgrid) sequences with the same symptom.<\/p>\n<p><strong>Situation<\/strong><br \/>\nA business application generates documents based on Microsoft Word \/ Excel. These documents use Macro&#8217;s \/ VBA to communicate with the application and retrieve the necessary data.<\/p>\n<p>During initial tests and the sequencing procedures everything works fine and no problems rise. However, in the tests on the terminal servers some &#8220;strange&#8221; occur when the documents are generated.<br \/>\nThese problems result in error messages about macro security and the unavailability of VBA. Even when the macro security is (tempory) lowered these error messages keep on showing.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-585\" src=\"https:\/\/ingmarverheij.com\/wp-content\/uploads\/2009\/10\/vba-error-detail31.png\" alt=\"VBA error\" width=\"633\" height=\"297\" \/><\/p>\n<p><strong>Cause and solution<\/strong><br \/>\nThe problem is caused by the isolation of softgrid (now AppV). Because VBA is not in the sequence, and not directly called by the application (but through Word), it can&#8217;t locate the necessary resources.<br \/>\n<!--more--><br \/>\nThe solution is to allow interaction with the local environment. This is done by adding the following lines in the OSD of the sequence:<\/p>\n<pre>&lt;SOFTPKG&gt;\r\n    &lt;IMPLEMENTATION&gt;\r\n        &lt;VIRTUALENV&gt;\r\n            &lt;POLICIES&gt;\r\n                &lt;LOCAL_INTERACTION_ALLOWED&gt;TRUE&lt;\/LOCAL_INTERACTION_ALLOWED&gt;\r\n            &lt;\/POLICIES&gt;\r\n        &lt;\/VIRTUALENV&gt;\r\n    &lt;\/IMPLEMENTATION&gt;\r\n&lt;\/SOFTPKG&gt;<\/pre>\n<p>Be carefull implementing local interaction, this could introduce application conflicts. You are disabling a part of isolation.<br \/>\nYou can read more about local interaction at this <a href=\"https:\/\/blogs.technet.com\/softgrid\/archive\/2007\/09\/20\/a-look-under-the-covers-the-local-interaction-allowed-tag.aspx\">Technet blog<\/a>.<\/p>\n<p>PS: <em>Same type of problems occur when hardware is addressed from an application.<\/em><\/p>\n<p>Ingmar Verheij<\/p>","protected":false},"excerpt":{"rendered":"<p>Today I had to solve a problem with multiple (Softgrid) sequences with the same symptom. Situation A business application generates documents based on Microsoft Word \/ Excel. These documents use Macro&#8217;s \/ VBA to communicate with the application and retrieve the necessary data. During initial tests and the sequencing procedures everything works fine and no [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[294],"tags":[55,56,57,58,59,666,60,61,10,62],"class_list":["post-578","post","type-post","status-publish","format-standard","hentry","category-microsoft-app-v","tag-allowed","tag-appv","tag-interaction","tag-local","tag-macro","tag-office","tag-security","tag-sequence","tag-softgrid","tag-vba"],"_links":{"self":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":4,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":2388,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/posts\/578\/revisions\/2388"}],"wp:attachment":[{"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ingmarverheij.com\/en\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}