Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I got a embedded file in a word document (Insert-->File). And I want to save that to a file to the disk. So far I copied the InlineShape to the clipboard. Then used following to get the file.


C#
IDataObject data = Clipboard.GetDataObject();
object fileobj;

if (data.GetDataPresent(DataFormats.EnhancedMetafile))
{
fileobj = data.GetData(DataFormats.EnhancedMetafile);
}

but last line throws an Exception

If I go to my windows explored and right click and paste, the file saves as a file I'm expecting. So I know the file has copied to the clipboard. But how to save that using code?
Any ideas?
Cheers,
GMan
Posted
Updated 15-Apr-10 20:40pm
v3

1 solution

Could you explain your question a little bit more and also can you please post your exception details as well. That would help us to identify the root cause.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900