locked
Opening a Word Document RRS feed

  • Question

  • User-1738733012 posted

    Hi,

    I'm very new to this and struggling quite a bit I been tasked to create a site that uses can request environment access; however I'm falling at the first hurdle. Frown

     <v:shapetype id=_x0000_t75 path="m@4@5l@4@11@9@11@9@5xe" stroked="f" filled="f" o:preferrelative="t" o:spt="75" coordsize="21600,21600"> <v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape style="WIDTH: 24pt; HEIGHT: 24pt" id=_x0000_i1025 type="#_x0000_t75" alt="Frown"></v:shape>This is probably a very simple task............

    I'm using Visual Web Developer 2008 Express Edition

    I need to call a Word document from a Buttont1_Click but I can't find the code i need to use, or work out the help files within Visual Web Developer 2008 Express Edition to work this out.

    Partial Class _Default<o:p></o:p>

    Inherits System.Web.UI.Page<o:p></o:p>

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<o:p></o:p>

    WHAT CODE NEEDS TO GO HERE!!!!!!!!!<o:p></o:p>

    End Sub<o:p></o:p>

    Monday, April 12, 2010 10:29 AM

All replies

  • User-1307730937 posted

    Hi,

    Do u want to open the word document serverside or client side? (means where does this doc file resides?)

    if  it is at server then Process.start('winword','path of file')

    and if it is at client then, it would be pain in neck, you would have to do something in client side scripting...

    this link might help you,

    http://www.whirlywiryweb.com/q/%2Flaunchinie.asp

    -Hitesh




    Monday, April 12, 2010 10:50 AM
  • User-1738733012 posted

    Firstly thanks for your quick response!

    The document will be located on the server...

    So I just need to add this code to the button1_click 'Process.start('winword','path of file')' changing the 'path of file' to where the file is located?

    Cheers

    Nick

    Monday, April 12, 2010 11:29 AM
  • User-1307730937 posted

    Yup you are right...

    see the article in MSDN for more information,

    http://msdn.microsoft.com/en-us/library/0w4h05yb.aspx

    do not forget to add system.diagnostics namespace also.

    -Hitesh

    -Mark as an answer if this has really helped you.

    Thanks.....

     

    Monday, April 12, 2010 11:51 AM