Hi,
We have tried embedding a PPT into document using below code. But the generated document doesn't open the embedded PPT on click of OLE icon.
package samples.OLE.java;
import java.io.File;
import org.apache.commons.io.FileUtils;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
import com.plutext.ole.EmbeddingType;
import com.plutext.ole.OleHelperDocx;
public class Docx_ole_Doc {
static org.docx4j.wml.ObjectFactory wmlObjectFactory = org.docx4j.jaxb.Context.getWmlObjectFactory();
public static void main(String[] args) throws Exception {
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
EmbeddingType embeddingType = EmbeddingType.PPT;
byte[] contentBytes = FileUtils.readFileToByteArray(new File("C:\\Users\\myUser\\Documents\\Test.ppt" ...