cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook VBO - Account Display Name error

JohanLorentzon
Level 3
Hello,

Using the action 'Send Email' in MS Outlook VBO v10.2.2 on BP v6.8.3, I strike upon a peculiar error when using the "Account Display Name" parameter:

Internal : Could not execute code stage because exception thrown by code stage:
Unable to find Account Display Name 'X'.
Public member 'Cast' on type 'Accounts' not found.

I have concluded that the following code line is throwing the exception:
Dim aa As List(Of Account) = olNamespace.Accounts.Cast(Of Account).ToList()

However, when trying to find more information on this error, I have struck a brick wall.

If anyone have experience of this error, or have any creative ideas on how to resolve it, I would very much appreciate your support.

BR/Johan
6 REPLIES 6

Hi Johan,


I replicated this issue,

35207.png

it's a namespace initiation issue, and also check the "Account Display Name" field "X" is added I guess

35208.png


------------------------------
Thanks
Prasanth
Software Engineer | RPA Developer
------------------------------

Thanks Prasanth Software Engineer | RPA Developer

JohanLorentzon
Level 3
Hi Prasanth,

Thank you for your reply. 

Unfortunately, "Unable to find Account Display Name 'X'." is a generic error message thrown whenever an error is caught within the Try-Catch block encompassing the code regarding Account Display Name. Hence, all exceptions occurring within that block will result in that very error message.

However, the specific error message is the latter part - i.e. "Public member 'Cast' on type 'Accounts' not found."  The only part where "Cast" is used on the "Accounts" object is "Dim aa As List(Of Account) = olNamespace.Accounts.Cast(Of Account).ToList()".

ewilson
Staff
Staff
Hi @JohanLorentzon,

I believe this comes down to a combination of the Blue Prism version and the version(s) of the .NET Framework installed. Try changing the following line of code:
Dim aa As List(Of Account) = olNamespace.Accounts.Cast(Of Account).ToList()


Change it to this:

Dim aa = TryCast(CObj(olNamespace.Accounts), List(Of Account))


Cheers,
Eric


Hi Eric,

I am having this same issue where it states "unable to find account display name", I have tried all possible variations of the display name I can find, and I have also tried your code change but that didn't work for me

I'm using 'Send Email' on the MS Outlook Email VBO - is there any other solution you can think of?

 

Thanks

Alex

Hi Alex,

 

I'm having the same issue - did you find a solution to this?

 

Thanks,

Josie

Thank you @Prasanth_IRPA_Dev. After several hours of research and testing it seems that you had already posted the solution here a while ago 😅. At first I thought it wasn't going to work because I was forgetting to execute the Initialize action/page manually after the change.

  • Object: MS Outlook Email VBO 10.4.1
  • Action: Get Received Items (Expert)
  • Details: exception when trying to use "Account Display Name" input parameter
  • Blue Prism Version: 7.3
  • Temporary Solution: change "Dim olNamespace As Object" with "Dim olNamespace As Microsoft.Office.Interop.Outlook.NameSpace" in the Global Code tab

@ewilson @electroisok @Gbril @jhogelp