Hi Darren,
Welcome to MSDN Newsgroup!
Based on your requirement, I suggest you could use OLE Drag and Drop com
technique to achieve the goal.
The Source of the drag-drop is represented by the IDropSource interface.
The IDropSource contains methods for generating visual feedback, and for
canceling or completing the drag-drop operation. The Target of the
drag-drop is represented by the IDropTarget interface. The Data being
transferred is represented by the IDataObject interface.
So you could take out data form database and use IDropSource interface to
transfer it. And then create a new file with the data from IDropSource. You
could refer to the following article to get more information about OLE
Drag/Drop:
Part 1 - Introduction OLE Drag and Drop Introducing the OLE and COM
technologies.
http://www.catch22.net/tuts/dragdrop.asp
Part 2 - OLE Data Transfers All about OLE data types, storage mediums and
data formats.
http://www.catch22.net/tuts/dragdrop2.asp
Part 3 - Implementing IDataObject Standalone implementation of the
IDataObject interface.
http://www.catch22.net/tuts/dragdrop3.asp
Part 4 - Enumerating FORMATETC Standalone implementation of the
IEnumFormatEtc interface.
http://www.catch22.net/tuts/dragdrop4.asp
Part 5 - Drop Source Implementing the IDropSource interface.
http://www.catch22.net/tuts/dragdrop5.asp
Part 6 - Drop Target Implementing the IDropTarget interface.
http://www.catch22.net/tuts/dragdrop6.asp
I hope the above information is helpful for you. If you have any questions,
please feel free to let me know. Thanks and have a nice day!
Best Regards,
Terry Fei [MSFT]
Microsoft Community Support
Get Secure!
www.microsoft.com/security