Last active
October 9, 2025 06:56
-
-
Save tdalon/d775d8361a04928b328cac5ceee86133 to your computer and use it in GitHub Desktop.
Outlook VBA: Open Teams Meeting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub OpenTeamsMeetingChat() | |
| Dim Item As Object | |
| Set Item = GetCurrentItem() | |
| If Item Is Nothing Then | |
| MsgBox "No Item selected" | |
| Exit Sub | |
| End If | |
| If Not TypeOf Item Is Outlook.AppointmentItem Then | |
| Exit Sub | |
| End If | |
| Dim regEx As Object | |
| Set regEx = CreateObject("VBScript.RegExp") | |
| ' Get Meeting Id by parsing for meeting link in the Body | |
| Dim sId As String | |
| Dim sChatLink As String | |
| With regEx | |
| .Pattern = "https://teams.microsoft.com/l/meetup-join/([^/]*)" | |
| .IgnoreCase = True | |
| .Global = False | |
| End With | |
| If regEx.Test(Item.Body) Then | |
| sId = regEx.Execute(Item.Body)(0).SubMatches(0) | |
| sChatLink = "msteams://teams.microsoft.com/l/chat/" & sId | |
| ' To open the URL, use Shell and default browser | |
| Shell "cmd /c start """" """ & sChatLink & """", vbHide | |
| End If | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment