I hope to insert an embedded object(another .docx file) into a .docx file. Is there any package that support this?
Must it be a Word document? You can easily write output to a
@catacombs, thank you for your reply!
Yes, the request from my manager is to insert one docx file into another docx file. Since we did this way manually before, now we hope to automate the same process. Do you have any idea?
I didn’t tried but at first sight are some resources on the internet like this one
@xxn, I’m still not sure what you mean by “inserting one docx into another docx.” What is the use case? Are you simply copying text from one file to another?
Not copy “text” from one file to another. The use case is copying one .docx file(as an object) to the text of another .docx file.
Isn’t that the same as
cp file1.txt file2.txt?
Documents (docx) [Word]
- Editing an existing document Open an existing document and replace/remove text without modifying formatting.
Sorry for late reply. I tried all the examples for document in unidoc/unioffice. But failed to find a method which I want.
Not the same as “cp file1.txt file2.txt”.
Actually, I use windows.
- Right-click word1.docx and select “copy”.
- Double-click word2.docx to open it.
- Put the cursor in the text of word2.docx. And right-click and select paste.
Then word1.docx will be inserted into word2.docx as an object.
I don’t know if there is an explicit concatenate function but I think you can read the content of one document and insert it at the end of the other.
This is something totally different.
Embedded objects in in
.docx is more like what the name says. An object that is fully embedded. Just think of it, as an image in HTML that is provided base64 encoded inline rather than the regular HTTP-URL to download the image drom.