Thomas Darimont
Erfahrenes Mitglied
Hallo,
hier mal ein Beispiel wie man eine Powerpoint Präsentation ganz einfach in Bilder exportieren kann, so dass sie von einem Bildbasierten Präsentationstool (wie etwa SessionFire: http://sessionfire.com/ ) verwendet werden können.
ConvertPowerPointSlidesToImages.vbs
Das ganze ging natürlich auch mit SWT / OLE Automation, aber so ist es viel einfacher... ;-)
Siehe http://www.tutorials.de/forum/java/206568-outlook-steuern-mit-java.html
Gruß Tom
hier mal ein Beispiel wie man eine Powerpoint Präsentation ganz einfach in Bilder exportieren kann, so dass sie von einem Bildbasierten Präsentationstool (wie etwa SessionFire: http://sessionfire.com/ ) verwendet werden können.
Java:
package de.tutorials;
public class PowerPointPresentationToImageConverterExample {
public static void main(String[] args) {
convertToImages("C:\\TEMP\\slides\\webMiningOverview.ppt", "C:\\TEMP\\slides\\webMiningOverview","png");
}
private static void convertToImages(String presentationLocation, String imagesLocation,String imageFormat) {
ProcessBuilder processBuilder = new ProcessBuilder("cmd", "/C", "cscript", "./scripts/ConvertPowerPointSlidesToImages.vbs"
,presentationLocation, imagesLocation, imageFormat);
try {
Process process = processBuilder.start();
System.out.println("process finished with exit code: " + process.waitFor());
} catch (Exception e) {
e.printStackTrace();
}
}
}
ConvertPowerPointSlidesToImages.vbs
Visual Basic:
Set args = WScript.Arguments
presentationLocation = args(0) 'c:/foo/bar/some.ppt
imagesOutputLocation = args(1) 'c:/temp/images
imageType = args(2) 'png
'msgbox presentationLocation &" " & imagesOutputLocation &" " & imageType
Set ppt = CreateObject("PowerPoint.Application")
Set presentation = ppt.Presentations.Open(presentationLocation,True,,False)
presentation.Export imagesOutputLocation, imageType
Set presentation = Nothing
ppt.Quit
Set ppt = Nothing
Das ganze ging natürlich auch mit SWT / OLE Automation, aber so ist es viel einfacher... ;-)
Siehe http://www.tutorials.de/forum/java/206568-outlook-steuern-mit-java.html
Gruß Tom