I just want to open it by clicking on a button or a hyperlink. It dont want to open it inside my program
Asked
Active
Viewed 39 times
0
-
2Hi Chris. Take a look at the SO help topic [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) – Hamlet Hakobyan Jun 08 '15 at 19:21
-
Possible duplicate of [Example using Hyperlink in WPF](http://stackoverflow.com/questions/10238694/example-using-hyperlink-in-wpf?rq=1). Refer to the accepted answer. – Suresh Jun 08 '15 at 19:23
-
i will do this, sorry – chris Jun 09 '15 at 20:14
1 Answers
0
if you dont want to open it within your application that means you will open it using the office application.
since you dont mention which programming language you use (i am guessing, from the wpf tag, some Visual Studio language) as the https://msdn.microsoft.com/en-us/library/tcyt0y1f.aspx
states
for c#
this.Application.Documents.Open(@"c:\users\testdocument.doc");
and for VB
Me.Application.Documents.Open("c:\users\testdocument.doc")
And opening it as read only
C#
this.Application.Documents.Open(@"c:\users\testdocument.doc", ReadOnly:true);
VB
Me.Application.Documents.Open(FileName:="c:\users\testdocument.doc", ReadOnly:=True)

Skaros Ilias
- 1,008
- 12
- 40