I have a similar issue - I've gotten this far, if someone could offer up
the next level of detail...
In my target external app - I setup a simple drag/drop control - and
wanted to see if I could get at the slide being dropped off. I selected
a slide from the slide-sorter, and drag/drop it on a textbox control as
a test.
The list of GetFormats shows the following:
Embedded Object
Object Descriptor
EnhancedMetafile
MetaFilePict
Link Source
Link Source Descriptor
<< this next guy looks interesting,but how do I use it?
PowerPoint 8.0 Internal Slides
ActiveClipboard
....
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using System.Runtime.InteropServices.ComTypes;
namespace MyNS.Designer
{
public partial class TestPanel : UserControl
{
// ...snip - normal form/usercontrol stuff...
private void textBox1_DragDrop(object sender, DragEventArgs e)
{
bool test;
string[] fmts = e.Data.GetFormats();
foreach (string s in fmts)
Debug.WriteLine(s);
DataFormats.Format myFormat = DataFormats.GetFormat("PowerPoint
8.0 Internal Slides");
if (e.Data.GetDataPresent(myFormat.Name))
{
// should be a valid format string...
Debug.WriteLine("GetDataPresent for " + myFormat.Name);
}
// so now how do I get the ppt.slide I just did a drag&drop with?
}
}
I am working on a new application and I would like to be able to drag and
drop slides from powerpoint into my application. Are there any examples of
how to do this? Do I need to write some kind of COM add-in to make this
happen or can it all be done from the clipboard? I am planning to develop my
application in csharp. Is there any reason that this wouldn't work?
Thanks,
Joe