cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Outlook Profiles using Outlook VBO

Venkata_Pranav_
Level 6
Will there be any support on reading emails from multiple Outlook profiles using the latest Outlook VBO. As of now, Outlook VBO could only read the default Outlook profile. 
Pranav
52 REPLIES 52

Hi Ami,
Thank you.
Still I'am getting "cannot create activex component" error at
app = GetObject(,"Outlook.Application")

I'm using "Mail32" in 64 bit system.
please let me know what has to be done.



------------------------------
Sindura Eaga

------------------------------

Have you attempted a repair of Office?

Additionally, what is the specific error on the line of code you posted? Errors such as the activex message don't typically contain lines of code in them.

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Hi Ami,
Thank you.
Please find attcahed screenshots for the modified code and exception.
I haven't done Office repair,Should I need to do Office repair to fix this issue?

------------------------------
Sindura Eaga

------------------------------

You mentioned that there was an error with the code on line 9. Can you check errors on that code stage, and see if it's still returning anything? If so, can you screenshot that?

If there are no compile errors, then it sounds like this workaround just doesn't work with your environment setup. So yes, I would try doing an Office repair on that machine and seeing what happens.

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Hi Ami,
Thank you.
Please find attached screenshot.

------------------------------
Sindura Eaga

------------------------------

Since there are no compile errors, there are no issues with how the code is formed.

As previously stated, since it's not functioning as we hoped, please try to run a repair on Office to see if this resolves the issue.

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Hey Ami!

I have imported your release and am struggling with two issues.

1, No matter what I put in the shared email or subfolder data item the code only returns unless I have the inbox or subfolder I want manually selected an open in Outlook. I can have a subfolder being passed through but have the inbox selected and the code will return the inbox that is selected and not the subfolder and vice versa. Same thing with if I manually select an inbox of one shared mailbox and pass the other, it will return the one that is selected manually in outlook. If I close outlook I receive and error: Object variable or with block variable not set. I have both inboxes set as visible, I even tried setting the subfolders to visible. Please let me know what you think!

2. I also have one  inbox that is returning specified cast is not valid. I am guessing there is an email in there that cannot be handled and was wondering how we could handle this to not fail in production.

Thank you! If its easier to set up a quick chat I am available whenever you can meet! Thank you!
Jonathan


------------------------------
Jonathan Morse
Analyst
National Grid
America/New_York
------------------------------

1) The currently selected folder issue is likely in  relation to a build I posted once to get around an O365 security issue in relation to programmatically calling subfolders in shared mailboxes. I would not be surprised if I got my forks crossed at some point. You should be able to revert that change by modifying the subfolder code in the "Internal_Get Items" page of that VBO. (Note to anyone reading this out of context, this does not apply to the out of the box Outlook VBO.)

If Sub_Folder <> "" Then
	''if sharedEmail <> Nothing then
	''	folder = app.ActiveExplorer.CurrentFolder
	''else
		For each name as string in Sub_Folder.Split("\")
			folder = folder.Folders(name)
		Next
	''end if
End If


2) Oddly enough, I saw this crop up elsewhere recently. It seemed like in that case, the VBO was struggling with non-SMTP addresses when pulling info. (IE: The sender address is an AD address, or some other non-"user@domain.com" type of address, such as "From Microsoft Outlook".) Do you have anything like that in the box you're pointing to?



------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------

Hey Ami thanks for the quick reply!

I think thats the issue we are having is we have office 365 security issues because I tried the above and now it cant see any of the shared mailboxes subfolders whether outlook is opened or closed.

I am fine with using the code we had prior and just modelling to click on a certain subfolder we want to view, however, my one concern is the ability to move an email from one subfolder to another is not going to work, and I cannot have both the subfolder where the email is located, and the subfolder where I need the email to go selected in order to get this to work.

Any thoughts or options we could try on this?

Thanks,
Jonathan Morse

------------------------------
Jonathan Morse
Analyst
National Grid
America/New_York
------------------------------

You might try one of the EWS VBOs floating around out there. Here's one on our DX from Agilify that I've seen people reference a few times.

https://digitalexchange.blueprism.com/dx/entry/16835/solution/ms-exchange-functions---agilify



------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------