I have a copy code as below. Which works well inside my application.
But if I try to copy a picture into word, it always fail!
Any tips?
=====
public static void SetPasteboard(Object obj)
{
IDataObject ido = new DataObject();
ido.SetData(obj);
if (obj is Bitmap)
ido.SetData(DataFormats.Bitmap, obj);
Clipboard.SetDataObject(ido);
}
Lloyd Dupont - 03 Dec 2005 06:41 GMT
never mind...
the problem was that I also copyed empty RTF to the data object...
I have a copy code as below. Which works well inside my application.
But if I try to copy a picture into word, it always fail!
Any tips?
=====
public static void SetPasteboard(Object obj)
{
IDataObject ido = new DataObject();
ido.SetData(obj);
if (obj is Bitmap)
ido.SetData(DataFormats.Bitmap, obj);
Clipboard.SetDataObject(ido);
}