DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43376>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43376 Summary: Macro code lost after edit a ppt file Product: POI Version: 3.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: critical Priority: P1 Component: HSLF AssignedTo: dev@poi.apache.org ReportedBy: [EMAIL PROTECTED] I create a ppt file with some macro code. Then I edit the ppt file by a java application. The java code is below: public class Test { public static void main(String[] args){ System.out.println("Start"); String data = "test abc"; try { FileInputStream fis = new FileInputStream ("d:\\test\\temp.ppt"); HSLFSlideShow hss = new HSLFSlideShow(fis); SlideShow ss = new SlideShow(hss); Slide slide = ss.getSlides()[0]; TextBox shape = new TextBox(); shape.setText(data); shape.setAnchor(new java.awt.Rectangle(50, 50, 500, 300)); // slide.addShape(shape); FileOutputStream fos = new FileOutputStream ("d:\\test\\result.ppt"); hss.write(fos); //ss.write(fos); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("End"); } } When I try to run the macro in the new ppt file "result.ppt", the error "File not found" occured. My Enviroument likes below: OS: Windows xp Simple Chinese Edition JDK: 1.4.2 poi: 3.0.1-FINAL-20070705 Office: ppt file is created by office xp & 2003 (I tried two ppt file create by different office edition) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]