Accueil > Forum > > > > ouvrir powerpoint
ouvrir powerpoint
lundi 9 juin 2003 à 15:36:34 |
ouvrir powerpoint

Tommy666
|
Salut, Comment faire pour ouvrir un document POWERPOINT depuis dotnet en c# ??? URGENT !!! Merci
|
|
mardi 10 juin 2003 à 09:45:46 |
Re : ouvrir powerpoint

Karlo
|
Si powerPijtt est deja installé tu lances juste un shell sur le path du doc, ppt s'ouvrira automatiquement l'exemple si dessous vient de planet ----------------------------------------------
using System; using System.IO; using System.Diagnostics;
namespace ProgramLauncher { /// <summary> /// This class allows you to launch an external program passing to it: /// the file name, some args, and if it should wait until finished /// </summary> public class ProgramLauncher { private string fileName = string.Empty; private string arguments = string.Empty; private bool waitUntilFinished = false; private int waitMillisecs = -1;
public ProgramLauncher(string fileName) { this.fileName = fileName; } /// <summary> /// </summary> /// <param name="fileName"></param> /// <param name="arguments"></param> /// <param name="waitUntilFinished"></param> public ProgramLauncher(string fileName, string arguments, bool waitUntilFinished) { this.fileName = fileName; this.arguments = arguments; this.waitUntilFinished = waitUntilFinished; } /// <summary> /// </summary> /// <param name="fileName"></param> /// <param name="arguments"></param> /// <param name="waitMillisecs"></param> public ProgramLauncher(string fileName, string arguments, int waitMillisecs) { this.fileName = fileName; this.arguments = arguments; this.waitMillisecs = waitMillisecs; } public void Launch() { using(Process p = new Process()) { p.StartInfo.FileName = this.fileName; if(this.arguments.Length > 0) { p.StartInfo.Arguments = this.arguments; } p.Start(); if(this.waitMillisecs!=-1) { p.WaitForExit(waitMillisecs); } else { if(this.waitUntilFinished==true) { p.WaitForExit(); } } p.Close(); } } } }
public class Tester { public static void Main() { string fileToLaunch = @"c:\windows\notepad.exe"; string fileToOpen = @"c:\documents\text.txt"; ProgramLauncher.ProgramLauncher pl = new ProgramLauncher.ProgramLauncher(fileToLaunch,fileToOpen,true); pl.Launch(); pl = new ProgramLauncher.ProgramLauncher(fileToLaunch); pl.Launch(); } }
---------------------------------------------- @+ K@rlo
------------------------------- Réponse au message : -------------------------------
> Salut, > > Comment faire pour ouvrir un document POWERPOINT depuis dotnet en c# ??? URGENT !!! Merci
|
|
mardi 10 juin 2003 à 09:47:53 |
Re : ouvrir powerpoint

Karlo
|
Apres avoir cherche ds la MSDN ya encore bp plus simple kom koi
System.Diagnostics.Process.Start("c:\\Fichier.ppt");
@+
------------------------------- Réponse au message : -------------------------------
> Si powerPijtt est deja installé tu lances juste un shell sur le path du doc, ppt s'ouvrira automatiquement > l'exemple si dessous vient de planet > ---------------------------------------------- > > using System; > using System.IO; > using System.Diagnostics; > > namespace ProgramLauncher > { > /// <summary> > /// This class allows you to launch an external program passing to it: > /// the file name, some args, and if it should wait until finished > /// </summary> > public class ProgramLauncher > { > private string fileName = string.Empty; > private string arguments = string.Empty; > private bool waitUntilFinished = false; > private int waitMillisecs = -1; > > public ProgramLauncher(string fileName) > { > this.fileName = fileName; > } > /// <summary> > /// </summary> > /// <param name="fileName"></param> > /// <param name="arguments"></param> > /// <param name="waitUntilFinished"></param> > public ProgramLauncher(string fileName, string arguments, bool waitUntilFinished) > { > this.fileName = fileName; > this.arguments = arguments; > this.waitUntilFinished = waitUntilFinished; > } > /// <summary> > /// </summary> > /// <param name="fileName"></param> > /// <param name="arguments"></param> > /// <param name="waitMillisecs"></param> > public ProgramLauncher(string fileName, string arguments, int waitMillisecs) > { > this.fileName = fileName; > this.arguments = arguments; > this.waitMillisecs = waitMillisecs; > } > public void Launch() > { > using(Process p = new Process()) > { > p.StartInfo.FileName = this.fileName; > if(this.arguments.Length > 0) > { > p.StartInfo.Arguments = this.arguments; > } > p.Start(); > if(this.waitMillisecs!=-1) > { > p.WaitForExit(waitMillisecs); > } > else > { > if(this.waitUntilFinished==true) > { > p.WaitForExit(); > } > } > p.Close(); > } > } > } > } > > public class Tester > { > public static void Main() > { > string fileToLaunch = @"c:\windows\notepad.exe"; > string fileToOpen = @"c:\documents\text.txt"; > ProgramLauncher.ProgramLauncher pl = new ProgramLauncher.ProgramLauncher(fileToLaunch,fileToOpen,true); > pl.Launch(); > pl = new ProgramLauncher.ProgramLauncher(fileToLaunch); > pl.Launch(); > } > } > > ---------------------------------------------- > @+ > K@rlo > > > > > ------------------------------- > Réponse au message : > ------------------------------- > > > Salut, > > > > Comment faire pour ouvrir un document POWERPOINT depuis dotnet en c# ??? URGENT !!! Merci >
|
|
mercredi 11 juin 2003 à 08:58:27 |
Re : ouvrir powerpoint
|
vendredi 22 août 2003 à 14:56:38 |
Re : ouvrir powerpoint

rintchu
|
Salut a tous,
j'ai vu dans cet article qu'il etait possible de lancer un notepad en lui donnant en parametre un fichier. Mais est il possible de l'ouvrir en lecture seule ? Que doit on ecrire pour cela ?
Merci de m'aider
------------------------------- Réponse au message : -------------------------------
> Apres avoir cherche ds la MSDN ya encore bp plus simple kom koi > > System.Diagnostics.Process.Start("c:\\Fichier.ppt"); > > @+ > > > > ------------------------------- > Réponse au message : > ------------------------------- > > > Si powerPijtt est deja installé tu lances juste un shell sur le path du doc, ppt s'ouvrira automatiquement > > l'exemple si dessous vient de planet > > ---------------------------------------------- > > > > using System; > > using System.IO; > > using System.Diagnostics; > > > > namespace ProgramLauncher > > { > > /// <summary> > > /// This class allows you to launch an external program passing to it: > > /// the file name, some args, and if it should wait until finished > > /// </summary> > > public class ProgramLauncher > > { > > private string fileName = string.Empty; > > private string arguments = string.Empty; > > private bool waitUntilFinished = false; > > private int waitMillisecs = -1; > > > > public ProgramLauncher(string fileName) > > { > > this.fileName = fileName; > > } > > /// <summary> > > /// </summary> > > /// <param name="fileName"></param> > > /// <param name="arguments"></param> > > /// <param name="waitUntilFinished"></param> > > public ProgramLauncher(string fileName, string arguments, bool waitUntilFinished) > > { > > this.fileName = fileName; > > this.arguments = arguments; > > this.waitUntilFinished = waitUntilFinished; > > } > > /// <summary> > > /// </summary> > > /// <param name="fileName"></param> > > /// <param name="arguments"></param> > > /// <param name="waitMillisecs"></param> > > public ProgramLauncher(string fileName, string arguments, int waitMillisecs) > > { > > this.fileName = fileName; > > this.arguments = arguments; > > this.waitMillisecs = waitMillisecs; > > } > > public void Launch() > > { > > using(Process p = new Process()) > > { > > p.StartInfo.FileName = this.fileName; > > if(this.arguments.Length > 0) > > { > > p.StartInfo.Arguments = this.arguments; > > } > > p.Start(); > > if(this.waitMillisecs!=-1) > > { > > p.WaitForExit(waitMillisecs); > > } > > else > > { > > if(this.waitUntilFinished==true) > > { > > p.WaitForExit(); > > } > > } > > p.Close(); > > } > > } > > } > > } > > > > public class Tester > > { > > public static void Main() > > { > > string fileToLaunch = @"c:\windows\notepad.exe"; > > string fileToOpen = @"c:\documents\text.txt"; > > ProgramLauncher.ProgramLauncher pl = new ProgramLauncher.ProgramLauncher(fileToLaunch,fileToOpen,true); > > pl.Launch(); > > pl = new ProgramLauncher.ProgramLauncher(fileToLaunch); > > pl.Launch(); > > } > > } > > > > ---------------------------------------------- > > @+ > > K@rlo > > > > > > > > > > ------------------------------- > > Réponse au message : > > ------------------------------- > > > > > Salut, > > > > > > Comment faire pour ouvrir un document POWERPOINT depuis dotnet en c# ??? URGENT !!! Merci > > >
|
|
Cette discussion est classée dans : ouvrir, powerpoint
Répondre à ce message
Sujets en rapport avec ce message
ouvrir fichier [ par FaustVII ]
je souhaiterai ouvrir un fichier a partir de mon programme (par exemple avec un bouton)j ai tenter d' utiliser file.open mais sans successi quelqu un
Ouvrir un Winform [ par jdaviaud ]
Comment fait on pour ouvrir depuis un winform principal ( Form1.cs ) , un autre Winform ( Form2.cs ) d'apres le clic d'un bouton ? car j'ai essayé les
openfiledialog [ par yho ]
bonjour,j'essaye d'utiliser la classe openfiledialog pour ouvrir une fenetre afin de choisir un fichier dans une liste ,voici mon code OpenFileDialog
une fenêtre dans un form [ par jagxx ]
Bonjour,J'aimerais savoir comment faire pour ouvrir une nouvelle fenêtre dans un form existant. Par exemple, pouvoir ouvrir deux fichiers en même temp
Ouvrir une nouvelle fenetre [ par kaiwoo ]
Comment fait on pour ouvrir une nouvelle fenetre.... Par exemple : quan dje clique dans mon menu je voudrais que lorsque que je cliques sur l'une des
URGENT POWERPOINT!!! [ par kurtc ]
Bonjour,J'ai réalisé une présentation sur powerpoint et j'aimerai savoir s'il est possible de la graver sur un CD. Je sais que cela est possible, mais
ouvrir notepad [ par mathnel ]
Je developpe un site en asp.net et je souhaiteraisouvrir le notepad. Comment faire?
Comment ouvrir un fichier hlp en C# [ par PascalCmoa ]
PascalCmoa email: PascalCmoaBonjour à tous <img src=/imgs
Ouvrir un programme en plein écran [ par Cameleon69 ]
Je sais récupérer ma résolution d'écran, mais je voudrais forcer l'ouverture d'un programme externe (fichier d'aide, chm) en plein écran.j'y arrive bi
ouvrir une nouvelle form à la place d'une autre [ par estebantonio ]
slt j'aimerais savoir comment, dans ma form menu, si je clique un element du menu, je peux ouvrir la form associee mais à la place de celle du menu??m
Livres en rapport
|
Derniers Blogs
TECHDAYS PARIS 2010 : SHAREPOINT 2010 POUR LES DéVELOPPEURSTECHDAYS PARIS 2010 : SHAREPOINT 2010 POUR LES DéVELOPPEURS par ROMELARD Fabrice
Animé par: Laurent Cotton Le développement dans SharePoint 2010 passe par plusieurs axes qui seront évoqués dans cette session, mais plus particulièrement les développements simples lié au besoin Business Business Connectivity Services Ce BCS es...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : PLEINIèRE DERNIER JOURTECHDAYS PARIS 2010 : PLEINIèRE DERNIER JOUR par ROMELARD Fabrice
Cette session est la dernière pleinière de ces 3 jours de TechDays Paris 2010. Généralement, cette troisième journée est plus axée sur l'avenir vu par Microsoft. Après un retour sur l'avenir vu par la Science Fiction ou par ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|