pls advise me how to launch app of new version teams using VBA code.

JD Kim 0 Reputation points
2023-12-26T05:26:27.6866667+00:00

in classic teams,

shellCommand = "cmd.exe /c start ms-teams:" & TeamsLink
  
this code works.

But after switch over to new teams 

shellCommand = "cmd.exe /c start ms-teams:" & TeamsLink

the code does not work at all.

shellCommand = "cmd.exe /c start microsoftteams:" & TeamsLink
'shellCommand = "cmd.exe /c start ms-teams:" & TeamsLink
' Execute the shell command
shell shellCommand, vbNormalFocus

I find out advise from bing. so i wrote code as above.
This code does not work at all.

Pls advise.
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. ChetanSharmamsft 1,036 Reputation points Microsoft External Staff Moderator
    2024-03-08T06:12:03.37+00:00

    Hello @JD Kim
    Thanks for raising your query.

    Please check below code:

    Sub LaunchTeams()
        Dim teamsPath As String
        teamsPath = "C:\Program Files (x86)\Microsoft\Teams\Update.exe" ' Path to Teams executable file
        ' Launch Teams using Shell command
        Shell teamsPath, vbNormalFocus
    End Sub
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.