Drag and Drop support for Powerpoint 12

J

Jim

I am developing a C# based application that needs to support drag and drop of
slide objects from PowerPoint 2007. The code I have written is able to
successfully detect the drop event and parse the data:

private void Form1_DragDrop(object sender, DragEventArgs e) {
if (e.Data.GetDataPresent("PowerPoint 8.0 Internal Slides") &&
e.Data.GetDataPresent("Object Descriptor")) {
// Get object descriptor data.
MemoryStream ms = (MemoryStream)e.Data.GetData("Object
Descriptor", false);
}
}

However, this code only works for PowerPoint 2003 and below. With
PowerPoint 2007, the IDataObject doesn't appear to have any supported formats.

string[] formats = e.Data.GetFormats(false); // the formats array is empty

Does PP12 have some new mechanism for drag/drop? Does it support the
traditional OLE drag and drop mechanism? Is there any example code that
shows how to do this with the new version?

Thanks,

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top