Hi
Anyone knows how to pass exchange server connection from Exchange scope activity to VBnet code in UiPath. I need to use voting option in emails and invoking vbNet code for that.
Welcome to the community
You need not have a vb for that…you can use html property and write html as below.please check
Cheers
Hi @dpaktr
To pass the connection from an Exchange Scope activity to a VB.NET script in UiPath, you can do the following:
- In the Exchange Scope activity, set the
Connection
property to a UiPath string variable that will store the connection string. - In the VB.NET script, use the
GetValue
method of theDictionary
class to get the value of the connection string from theScope
object.
Could you please detail.
Please share the code for vbNet if possible.
In the Exchange Scope activity:
- Drag the Exchange Scope activity onto the designer canvas.
- Set the
Connection
property to a UiPath string variable (e.g.connectionString
) that will store the connection string. - Set the other properties of the Exchange Scope activity as needed (e.g.
Mailbox
andFolderPath
). - Run the workflow.
In the VB.NET script:
- Declare a string variable to store the connection string (e.g.
Dim connectionString As String
). - Use the
GetValue
method of theDictionary
class to get the value of the connection string from theScope
object (e.g.connectionString = Scope.GetValue("connectionString").ToString()
). - Use the connection string to connect to the Exchange server (e.g.
' Your code for connecting to the Exchange server goes here
).
This will pass the connection string from the Exchange Scope activity to the VB.NET script, where it can be used to connect to the Exchange server.
Thanks for the reply.
But the scope is throwing error.
Please detail the code in vbNet for sending emails with voting options with exchange server connection from Exchange scope activity of UiPath