Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Launching Word in .NET (C#/Word97)

    Please, does anyone have any idea of how to launch word in this miserable language

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launching Word in .NET (C#/Word97)

    I realize this isn't an answer to your question, but if you're using the .NET Studio couldn't you just as easily accomplish your goal with VB.NET (rather than C#)?

    I haven't learned all of the new language features, but you should be able to do a typical automation routine with VB: Dim wdApp as New Word.Application...etc (be sure to add Word as a reference).

    HTH <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  3. #3
    New Lounger
    Join Date
    Nov 2001
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launching Word in .NET (C#/Word97)

    Thanks for your reply Mark, I did think of VB.NET but I didn't want to be beaten by C#. If you are interested, I found an answer to the problem which is rather elegant.
    Using System.Diagnostics it is just 4 lnes of code:

    Process proc = new Process();
    proc.StartInfo.FileName = @"winword.exe";
    proc.StartInfo.Arguments = @"C:Test.doc";
    proc.Start();

    Cheers, Paul

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launching Word in .NET (C#/Word97)

    ...not so miserable after all, eh?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •