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 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko [FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|