Hi friends !
I have created a code by use of an example which works, ...
But I dont know WHY
the code is
Code:
void wordLoader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
IDataObject data = Clipboard.GetDataObject();
_rtbDoc.Paste(); // RTB is my Richtextbox
....
In the worker thead I'm opening a word document selecting it by use of 'WholeStory' and copying the selection. So This I understand loads it into the clipboard. But in the above code the red italic line what does it do ? Because IDataobject is not used anywhere else in all of my code. But if I delete this line the paste method of my richtextbox stays empty.
Also I tried to use it just after reading the data in the 'do delegate' of the backgroundworker and having the paste() method in the Completed method. This also results in an empty RTB. So what does the method Clipboard.GetDataobject do with the data so Paste() can read from the clipboard.

I'm asking because I hate things which I cannot understand, they seem to tend to be risky , because maybe then sometimes it will work, sometimes fail, I dont know. Who can explain me what goes on behind the scenes.