Copying one FlowDocument to a second FlowDocument

How can I copy the contents of one FlowDocument to another FlowDocument below that I tried

foreach (var blk in fd1.Blocks) { fd2.Blocks.Add(blk); } 

fd1 is FlowDocument1 and fd2 is FlowDocument2.

But I get the error below.

The collection has been modified; an enumeration operation may not be performed.

thanks

Erwind

+6
copy flowdocument
source share
1 answer
+3
source share

All Articles