Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Lancer une application office en C#

Lancer,une,application,office,en,C#
{filelink=15060}

using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Word;
 
namespace Client.Chapter_19___Office_Integration
{
  public class RunActiveObject
  {
    [STAThread]
    static void Main(string[] args)
    {
      Word._Application MyWord = (Word._Application)Marshal.GetActiveObject("Word.Application");
 
      MyWord.PrintPreview = true;
      System.Windows.Forms.Application.Run();
    }
}

No comments yet.

Leave a Comment