private void ContactDataGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2) // Assuming it's the first column
{
Process.Start("mailto:"
ContactDataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
}
}
This is my code to add an email hyperlink to my datagridview. The email is taken from a textbox. I would like to do the same where I would enter a contact into a textbox and can then click this hyperlink to open up Microsoft Teams along with the contact.
Is this possible?
CodePudding user response:
I suppose you to use GraphAPI for Microsoft teams so you manipulate your application with Microsoft Teams chats, channels and connections and many else
Best
CodePudding user response:
You can use msteams:
url scheme like this:
Process.Start("msteams:/l/chat/0/[email protected]&message=Hello")
Then it opens Microsoft Teams with a draft message ready to send to the user.
Note: There's a TeamsJS library to create deep links, but there's only JavaSCript SDK for this purpose. Above method (using msteams:
) works well.