question

NavnathKumbhar-1461 avatar image
0 Votes"
NavnathKumbhar-1461 asked NavnathKumbhar-1461 answered

Excel hyperlink opens in two tabs in default browser

Hello,

I am facing this strange issue with MS Excel (also with MS Word and MS PowerPoint).
When I create a hyperlink in Excel and click to open it, it opens in two tabs in my default browser.
I found some articles on web regarding this issue and most of the times I get this suggestion: cannot-locate-server-when-click-hyperlink


But, it did not help me. I tried to change the default browser but it also did not help.
Is this issue really exist and well documented somewhere in Microsoft documentation?

As a workaround, I decided to open the hyperlink using FollowHyperlink event as below: [Because I wanted to prevent default Excel hyperlink click behavior]

 sheet.FollowHyperlink += new Microsoft.Office.Interop.Excel.DocEvents_FollowHyperlinkEventHandler(HandleHyperlink);
    
 void HandleHyperlink(Microsoft.Office.Interop.Excel.Hyperlink Target)
     {           
         System.Diagnostics.Process.Start(Target.Address);
      }


It opened the hyperlink but did not prevent default click behavior of Excel. This time hyperlink is opened in 3 tabs (2 tabs with default Excel behavior and one with this HandleHyperlink callback)
Do you have any solution for this? Any Excel API?

[FYI, I tried the hyperlink click behavior in OpenOffice and Libreoffice. This issue does not exist there.]

I am using Windows 10.
Excel version: 2016 (16.0.5317.1000) MSO (16.0.5278.1000) 32 bit




office-excel-itprooffice-scripts-excel-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NavnathKumbhar-1461 avatar image
0 Votes"
NavnathKumbhar-1461 answered

Any solution for this please?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.