OleObjectFrame oleShape = (OleObjectFrame)shape;
BufferedImage img = oleShape.getThumbnail();
File randomFile = File.createTempFile(“thumbnail”, “.png”, new File("./"));
ImageIO.write(img, “png”, randomFile);
The image is too small, and some content is missing from the thumbnail result.