Attaching a text or zip file to a Aspose Word file

I want to attach a txt or zip file to a Aspose word document.

Could I get the code snippet of how to achieve it.

I am able to do it in Aspose PDF. But not getting any document to follow to steps for Aspose word.

The output should look like this image.

private static File addTextAttachment(File file, String wordFileName) {
    File wordFile = null;
    Document document = null;
    try
    {
        document = new Document();
        DocumentBuilder builder = new DocumentBuilder(document);
        builder.write(file.getName());
        //want to add file as attachment after the file Name text appear in the word file, shown in image
        document.save(wordFileName);

        wordFile = new File(wordFileName);
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
    return wordFile;
}

Could you please share the code snippet as I am not able to find the classes required in aspose words to achieve this .

@rinkusm Please see our documentation to learn how to work with embedded OLE objects:
https://docs.aspose.com/words/java/working-with-ole-objects/