Hi Team,
Please let us know how to add audio file (.wav) in the Document. I have attached the sample file for your reference
Thanks in advance
// Create a Document object to store the content of the document
Document doc = new Document();
// Add a Section to the document
Section sec = doc.addSection();
// Add a Paragraph within the Section
Paragraph paragraph = sec.addParagraph();
// Create a DocPicture object for inserting images
DocPicture picture = new DocPicture(doc);
// Load an image file into the DocPicture object
picture.loadImage("data/audio.jpg");
// Add an OLE object in the Paragraph, which contains an audio file and using an image as an icon
DocOleObject ole = paragraph.appendOleObject("data/test.mp3", picture, OleObjectType.Wave_Sound);
// Set the OLE object not to display as an icon
ole.setDisplayAsIcon(false);
// Save the document as a Docx format file
doc.saveToFile("output/AddOLE.docx", FileFormat.Docx_2013);
// Release the resources of the document
doc.dispose();