Hi
I wish to embed/insert a docx in to another docx . below is the code i have written ;
public static Object insertOLE(WordprocessingMLPackage wordMLPackage) throws Exception
{
wordMLPackage.getContentTypeManager().addDefaultContentType("bin", ContentTypes.WORDPROCESSINGML_DOCUMENT);
File file = new File("c:\\temp\\image1.emf" );
java.io.InputStream is = new java.io.FileInputStream(file);
long length = file.length();
if (length > Integer.MAX_VALUE) {
System.out.println("File too large!!");
}
byte[] bytes = new byte[(int)length];
int offset = 0;
int numRead = 0;
while (offset < bytes.length
&& (numRead=is.read(bytes, offset, ...