This project has moved and is read-only. For the latest updates, please go here.

ReplaceText with a docx instead of a text?

Feb 16, 2011 at 8:39 PM

Hi,

First of all, congratulations for this great project!!

Well, is there anyway to replace a string with a docx document instead of a text!?

Something like that:

                    using (DocX document = DocX.Load("template.docx"))
                    {
                      document.ReplaceText("[question1]"DocX.Load("question1.docx"));
                      document.ReplaceText("[question2]"DocX.Load("question2.docx"));

                      document.Save();
                    }

Thanks a lot,

Bruno

Apr 11, 2011 at 7:09 PM

Hi Cathal,

Is it possible to replace the text with a docx instead of a text, just like in the example above!?

 

Regards,

Bruno 

Apr 17, 2011 at 6:05 PM

Hi Bruno,

merging documents is a very tricky task. I did add basic support for this ages ago but to be honest it caused more problems than it solved.

DocX documents are so very rich, they can contain custom styles, pictures, charts, smart art, tables, lists, etc. Merging documents means adding all of the custom stuf from one document into another and then making sure that no id's conflict after the merge.

I will eventually (do a huge amount of work) and getting merging working but it wont be very soon.

Regards,
Cathal

Nov 11, 2014 at 11:37 AM
Edited Nov 11, 2014 at 11:38 AM
Hi Cathal,

i just read your answare regarding "merging" documents and was asking myself if 4 years was enougth time for "not very soon" :)
i just also need this feature :)