Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Non-Mathematica formats, e.g. .doc or .txt files, are directly shown in a new notebook when I click on a hyperlink pointing at these objects. But I would rather have (for example) .doc files opened using Microsoft Word. How can one create a hyperlink that opens a file in its associated application, rather than in Mathematica?

share|improve this question
Please check this Q/A .. link to a generic file and the docs page SystemOpen – kglr Jan 16 '13 at 9:36

Slightly modified version of this answer to a related Q/A.

Row[{"Buttons that look like hyperlinks to open files \n ", 
Sequence @@ (Button[
   Dynamic@Style[#[[1]], 14, 
     If[CurrentValue["MouseOver"], "HyperlinkActive", 
   SystemOpen[$InstallationDirectory <> 
     "\\Documentation\\English\\System\\ExampleData\\" <> #[[2]]],
    Appearance -> None] & /@
 {{"Spikey   ", "spikey2.png"},
  {"Calendar   ", "calendar.ics"},
  {"A pdf file   ", "mathematica.pdf"}}),
  " \nusing ", Hyperlink["SystemOpen", "paclet:ref/SystemOpen"], "."}]

enter image description here

share|improve this answer

You can open with Word like this:

file = "";

Run["start winword \"" <> file <> "\""];

And you could make a hyperlink like this:

Row[{Style["Demo\[ThinSpace]", FontFamily -> "Arial"],
 Button[Style["test doc", Blue, FontFamily -> "Arial"],
  Run["start winword \"" <> file <> "\""], Appearance -> "Frameless"],
 Style["\[ThinSpace]hyperlink", FontFamily -> "Arial"]}]

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.