0

I just want to open it by clicking on a button or a hyperlink. It dont want to open it inside my program

chris
  • 11
  • 2

1 Answers1

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