Search code examples
vbapowerpoint

Switching from Chrome to Microsoft Edge browser


As my current script given below is opening in chrome, i needed it opened in Microsoft Edge, tried my luck by googling didn't got any success

Sub CoverPageDatabase()

  Dim chromePath As String

  chromePath = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""

  Shell (chromePath & " -url http://www.stackoverflow.com/")

End Sub

Please help me to get the solution


Solution

  • Is this what you are trying?

    Option Explicit
    
    Sub CoverPageDatabase()
        Dim EdgePath As String
        Dim sUrl As String
        
        EdgePath = "C:\Windows\explorer.exe ""microsoft-edge:"""
        sUrl = "http://www.stackoverflow.com"
        
        Shell (EdgePath & sUrl)
    End Sub