E
Erwin
I want to make a 1:n relationship with mail-merge
documents by embedding a subdocument (also an mail-merge
document) in a main-document.
// JScript
...
// mainRng is the range of the main document
// subRng is the range of the sub document
mainRng.Subdocuments.AddFromRange(subRng);
...
But when I do so, I get the error message:
The specified range doesn't belong to this
document/article (free translated from the german error
msg).
When I try to make it with text replacement:
// JScript
...
mainRng.InsertAfter(subRng.FormattedText);
...
I lose all formattings - only pure Text will be inserted.
That's not what I want.
Is there an other solution for my problem, where I can
insert the hole sub-document (with all formattings,
tables, etc.) in the main-document?
documents by embedding a subdocument (also an mail-merge
document) in a main-document.
// JScript
...
// mainRng is the range of the main document
// subRng is the range of the sub document
mainRng.Subdocuments.AddFromRange(subRng);
...
But when I do so, I get the error message:
The specified range doesn't belong to this
document/article (free translated from the german error
msg).
When I try to make it with text replacement:
// JScript
...
mainRng.InsertAfter(subRng.FormattedText);
...
I lose all formattings - only pure Text will be inserted.
That's not what I want.
Is there an other solution for my problem, where I can
insert the hole sub-document (with all formattings,
tables, etc.) in the main-document?