none
Default Browser not working from MS Word RRS feed

  • Question

  • Hi,

    I have an application in MS Word. Whenever I click on any of the link inside the word, it always navigates via IE browser even though my default browser is Chrome or Firefox.  How can I open the link via default browser (Chrome/FF)?

    Codebehind is in C# and we haven't hard-coded anything for IE browser.

    Any pointers or help will be appreciated.


    Thanks, Atit Shah

    Wednesday, April 18, 2012 1:47 PM

Answers

All replies

  • This is most likely by design.
     
    For what it’s worth, the same applies to the SeaMonkey suite which always opens links in its own browser, no matter which is set as the Windows default.

    Stefan Blom, Microsoft Word MVP
    Wednesday, April 18, 2012 7:12 PM
  • Thanks Stefan for the reply. So, is there any solution for it, I am sure there must be?


    Thanks, Atit Shah

    Wednesday, April 18, 2012 8:46 PM
  • Thanks Stefan for the reply. So, is there any solution for it, I am sure there must be?
                 
      

    Sorry, I don't know of any workaround.


    Stefan Blom, Microsoft Word MVP
    Thursday, April 19, 2012 10:00 PM
  • Hi  Atit Shah,

    <<I have an application in MS Word. Whenever I click on any of the link inside the word, it always navigates via IE browser even though my default browser is Chrome or Firefox.  How can I open the link via default browser (Chrome/FF)?>>

    I tested on my side and can't reproduce your problem. If I set the Chrome as the default web browser, after clicking the links in the word, I can open the corresponding page via Chrome.

    What is the version of your OS and word application? Mine enviroment is Win7 64bit  and Word 2010 SP1

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us


    • Edited by Bruce Song Tuesday, April 24, 2012 2:38 AM
    Monday, April 23, 2012 6:56 AM
  • Hi Bruce,

    This happens in WinXP, Win7 and Win Vista as well. I have checked in Word 2010 so far.

    This happens in our project and this is what exactly happens:

    (1) Open Word 2010

    (2) Run our project Toolbar which will open a new Window (Win Form)

    (3) Click on any link and all open up in IE.


    Thanks, Atit Shah

    Monday, April 23, 2012 7:22 PM
  • Hi, Atit

    The step (2) you mentioned is making difference between the two sides. Without Word addin(Winform) in your side, default web browser settings work as expected.  Links in Word document can also be open with Chrome and Firefox.  Would you tell more detail about customized application.  Is it a Shared addin ?  When you say project Toolbar, is it a customized ribbon ?

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Tuesday, April 24, 2012 6:27 AM
    Moderator
  • Hi Atit,

    I haven't received a response yet, given there's no response, I'll close this thread.  We could not proceed with existing information.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 26, 2012 3:27 AM
    Moderator
  • Hi Forrest, sorry for the late reply.

    Yes, we have com add-in which works in Word 2003, 2007 and 2010. It is not a ribbon though.

    Our toolbar finds the legal terms from the Word doc and then display the result in a separate window (winform). This WinForm will have a lot of links which are opening in IE only.

    Kindly let me know if you need more info.


    Thanks, Atit Shah

    Thursday, April 26, 2012 3:32 AM
  • Hi Atit,

    You reply changes my focus significantly, I turn to Winform with link now.  Which control do you use to present the links?  In my test, I used LinkLable and it respect the default browser setting.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 26, 2012 3:56 AM
    Moderator
  • Hi Forrest,

    We write the anchor tags '<a>...</a>' in the C# code behind itself to set the hyperlinks dynamically. As you described above, we don't have specific control to showcase links.

    If you need a sample, I can take them out from the code and will paste it.

    Also, I am in EST (USA) timezone so my reply can be delayed.


    Thanks, Atit Shah

    Thursday, April 26, 2012 4:20 AM
  • Yes, please share code sample about how you dynamically show hyperlinks.

    thanks,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 26, 2012 4:50 AM
    Moderator
  • Hi Forrest,

    Here are couple of samples I have taken from my code where we create a hyperlink:

    Sample #1:

    StringBuilder sigLink = new StringBuilder();

    sigLink.Append("http://");
    sigLink.Append(CiteCheckSystemSettings.LNBHost);
    sigLink.Append(RosettaUrlApi.ResolveCitationPath);
    sigLink.Append("?cc=GB");
    sigLink.Append("&oc=00987");  sigLink.Append(RosettaUrlApi.CommonParams);
    sigLink.Append("&linkInfo=" + HttpUtility.UrlEncode(linkinfo));
    sigLink.Append(CiteCheckCommonSettings.AppendUrl);

    Sample #2:

    "<A target=\"_blank\" href=\"" + sigLink + "\">" + text + "</A>

    Kindly let me know if you need more details.


    Thanks, Atit Shah


    • Edited by Atit Shah Thursday, April 26, 2012 2:25 PM privacy
    Thursday, April 26, 2012 2:24 PM
  • Thank you sharing the samples. I'll get back and update in around 9 hours.  My timezone is:  UTC +8.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 26, 2012 3:47 PM
    Moderator
  • No problem Forrest, thanks.

    Thanks, Atit Shah

    Thursday, April 26, 2012 5:13 PM
  • Hi Atit,

    I'm not sure how you associate the above code with the Winform code behind.  How the html tag <a> are used in Winform?  Would you elaborate please?

    thanks,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, April 27, 2012 1:27 AM
    Moderator
  • Hi Forrest,

    Hyperlinks are not pasted on the Winform. But the Winform has WebBrowser Control. I have copied the image of the Winform which includes couple of hyperlinks. I hope you would be able to view the image. If I click on any of this links, it will open only in IE browser.


    Thanks, Atit Shah

    Friday, April 27, 2012 2:20 AM
  • Hi Atit,

    I think I know what's happened. The behavior you see is expected.  Winform Web Browser control is IE based, when it navigates a url and open new window, it opens IE window.  See remark section of this API document, WebBrowser.Navigate() http://msdn.microsoft.com/en-us/library/k6232xsx.aspx

    Unlike we click a linklable on Winform, Process.Start(url) will respect default web browser setting. But Winform web brower will not.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, April 27, 2012 3:21 AM
    Moderator
  • So, does that mean the default browser functinality can not work in this scenario?

    Thanks, Atit Shah

    Friday, April 27, 2012 3:47 AM
  • Yes, I'm afraid that's true.  You may document this behavior in your product help, or change the implementation.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, April 27, 2012 3:53 AM
    Moderator