What is the best what to copy text from one document to another


Author
Message
Mike Willis
Mike Willis
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 18, Visits: 109
Hi,
I am using OpenVision Enterprise
What is the recommended way to copy text from one document to another, both opened in memory?
Specifically i want to do a mail merge in one document, and copy the resulting merge to another document.
Thanks, 
Mike Willis


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K
Hi Mike,
There are generally two ways to do this fast:
1. You can use deep clone on the view.Content for example:
NDocumentBlock block = (NDocumentBlock)nRichTextViewWithRibbonControl1.View.Content.DeepClone();
nRichTextViewWithRibbonControl2.View.Content = block;
or 
2. You can save / load the document to a memory stream:
MemoryStream memoryStream = new MemoryStream();
nRichTextViewWithRibbonControl1.View.SaveToStream(memoryStream, new NNevronXMLTextFormat(), null);
memoryStream.Seek(0, SeekOrigin.Begin);
nRichTextViewWithRibbonControl2.View.LoadFromStream(memoryStream, new NNevronXMLTextFormat());

We would recommend you to use the first approach as there is no added overhead of XML formatting. Let us know if you have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search