<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Just a follow up, I was able… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/VBA-Macro-Behaves-differently-between-Control-Room-and-Test/m-p/59351#M13016</link>
    <description>Just a follow up, I was able to solve (or at least develop a work around) for this issue.&amp;nbsp; If I initially run Outlook as an administrator, then the macro runs as intended.
&amp;nbsp;
This doesn't explain why the process/macro initially&amp;nbsp;would work using Test Process and not Control Room, but it does render that issue/concern moot for this specific process.</description>
    <pubDate>Thu, 21 Dec 2017 03:23:00 GMT</pubDate>
    <dc:creator>JasonNikowitz</dc:creator>
    <dc:date>2017-12-21T03:23:00Z</dc:date>
    <item>
      <title>VBA Macro Behaves differently between Control Room and Test Process</title>
      <link>https://community.blueprism.com/t5/Product-Forum/VBA-Macro-Behaves-differently-between-Control-Room-and-Test/m-p/59350#M13015</link>
      <description>Sorry if this is being posted to the wrong forum, I wasn't sure of the appropriate location.

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

I'm having an issue where a VBA Macro that is called by my process behaves differently if it is run from the Test Process environment vs. the Control Room.&amp;nbsp; I'm looking to find some guidance on what could be causing this difference of behavior.

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

For some more details, I'm using a VBA macro that lives in an Excel file to send an e-mail from an Outlook account.&amp;nbsp; Specifically:

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;


	Blue Prism process obtains information for said e-mail
	Blue Prism opens excel and runs the 'Send_Email' VBA Macro
	VBA Macro (from excel) creates an Outlook object,
	VBA Macro builds a message using Outlook object
	VBA Macro&amp;nbsp; sends message
	Blue Prism continues with the rest of process


&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

The reason I'm using Excel VBA to send an e-mail instead of Blue Prism direct is that we ran into security/permissions issues (on our side, not BP's)&amp;nbsp;that didn't allow Blue Prism to robotically send e-mails directly from Outlook.&amp;nbsp; Apparently IT/Security is fine with us sending automated e-mails via VBA (*shrug*).

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

I'm using a modified Excel VBO that contains a "Call Macro" task.&amp;nbsp; It is a part of many other successful BP Processes I run, and it is successfully calling the VBA macro in this specific process, so I'm fairly confident that is not the source of my issue.

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

Below is the relevant VBA code from the Send_Email macro:

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim Outlook As Object

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;


&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Message As Object

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;


&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Outlook = CreateObject("Outlook.Application")

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;


&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Message = Outlook.CreateItem(0)


&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

When the macro errors, it is on the 'Set Outlook..." line of the code (step 3 above) and provides the error 'Error 429 - ActiveX component can't create object'

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

Now normally I wouldn't assume that a VBA error should be addressed in the Blue Prism forums, but here's the curious thing:&amp;nbsp; This macro error only occurs when the process in run from the Control Room.&amp;nbsp; If I run the process in the Test Process environment or if I run the macro manually, it runs successfully.

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

So my main question is: What could possibly be different between the Test Process and Control Room runs that would cause this macro to behave differently?&amp;nbsp; Has anyone run into something like this before?&amp;nbsp; Does anyone have suggestions for solutions or future debugging?

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

&amp;nbsp;

Thanks in advance!</description>
      <pubDate>Wed, 20 Dec 2017 19:31:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/VBA-Macro-Behaves-differently-between-Control-Room-and-Test/m-p/59350#M13015</guid>
      <dc:creator>JasonNikowitz</dc:creator>
      <dc:date>2017-12-20T19:31:00Z</dc:date>
    </item>
    <item>
      <title>Just a follow up, I was able…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/VBA-Macro-Behaves-differently-between-Control-Room-and-Test/m-p/59351#M13016</link>
      <description>Just a follow up, I was able to solve (or at least develop a work around) for this issue.&amp;nbsp; If I initially run Outlook as an administrator, then the macro runs as intended.
&amp;nbsp;
This doesn't explain why the process/macro initially&amp;nbsp;would work using Test Process and not Control Room, but it does render that issue/concern moot for this specific process.</description>
      <pubDate>Thu, 21 Dec 2017 03:23:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/VBA-Macro-Behaves-differently-between-Control-Room-and-Test/m-p/59351#M13016</guid>
      <dc:creator>JasonNikowitz</dc:creator>
      <dc:date>2017-12-21T03:23:00Z</dc:date>
    </item>
  </channel>
</rss>

