none
Clipboard formats for drag & drop - Woozle, FileContents, & Embed Source

    Question

  • Hi;

    I'm trying to create a DOCX in memory that I can provide for a Drag & drop operation.

    I first tried "Embed Source." However, while it seems to be perfect (DOCX in an OLE wrapper), Word does not use it for drag & drop although it does use it for cut & paste. Is there a way to force Word/Excel/PPT to use "Embed Source?"

    Second I looked at the formats Word does ask for. The only two that looked like possibilites are Woozle and FileContents. Unfortunately neither of thise are used for Paste by word so I couldn't get ClipSpy to show them.

    What is Woozle?

    And what is FileContents? From what little I could find on Google it looks like it is a stream. If so, is it a stream to a DOCX file and can I pass a .net Stream?

    thanks - dave


    Very funny video - What's your Metaphor?
    Thursday, January 13, 2011 9:41 PM

All replies

  • Hello Dave,
     
    Thanks for posting. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support. Have a nice weekend.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 14, 2011 10:28 AM
  • Hi Bessie;

    Any luck finding someone yet?

    thanks - dave


    Very funny video - What's your Metaphor?
    Thursday, January 20, 2011 11:07 PM
  • Hey David,

    Woozle seems to be related to the RTF format since the information looks the same in ClipSpy.  As for FileContents, it could be a file stream like you mentioned.  Adding a link to see if that helps.

    http://msdn.microsoft.com/en-us/library/bb776902(VS.85).aspx#CFSTR_FILECONTENTS

    Why do you think those two are the only two possibilities?

    Brandon

    Wednesday, January 26, 2011 12:00 AM
    Moderator
  • Hi;

    Let me speak to your last question first. We want to pass a DOCX file (that we have saved off). This gives us the ability to drag/drop an object of ours that includes charts & content controls - RTF, HTML, etc don't support chart and content control objects.

    So anything that gives us the ability to provide a DOCX file on a drag/drop is good for us.

    Woozle as RTF is out. So it looks like FileContents is it. I tried returning a .NET Stream of the DOCX for it and Word did not like that. So I guess my next question is:

    1. What exactly is it expecting in the stream returned (ie a DOCX file or is there a header structure)?
    2. The link you gave me says the "stream" can be several objects. What works best from .NET?
    3. Is there an example of code, preferable C# but C++ would be ok, of returning an object for a FileContents? This will help a lot because randomly trying rarely works for returning something like this to Office as it silently fails.

    thanks - dave


    Very funny video - What's your Metaphor?
    Wednesday, January 26, 2011 12:33 AM
  • 1. I don't know for sure, but if I had to guess I would say it's a file not a header structure.

    2. The stream class is a base class so any of the accepted streams should work fine.

    http://msdn.microsoft.com/en-us/library/system.io.stream.aspx

    3. I haven't seen anything that specifically handles this, but the following link has something similar.

    http://www.codeproject.com/KB/office/outlook_drag_drop_in_cs.aspx

    Brandon

    Monday, January 31, 2011 4:59 PM
    Moderator
  • Hi;

    I have tried everything I can think of and no luck. I return "FileContents" as the only format returned for IDataObject.GetFormats() and IDataObject.GetDataPresent(). GetDataPresent() does ask if "FileContents" is present.

    But it will not call IDataObject.GetData() if "FileContents" is the only format. If I return "Rich Text Format" and "FileContents" then it does call GetData() but for RTF.

    Do I need to handle another format also for it to use "FileContents"? Or does it ask for it but not use it? The formats passed to GetDataPresent() are:
    "FileDrop"
    "Woozle"
    "Art::GVML ClipFormat"
    "Office Drawing Drag-Drop Format"
    "Office Drawing Shape Format"
    "PNG+Office Art"
    "GIF+Office Art"
    "JFIF+Office Art"
    "MSClipGallery"
    "HTML Format"
    "Rich Text Format"
    "Object Descriptor"

    While ClipSpy reports the following for drag/drop:
    "Woozle"
    "HTML Format"
    "Rich Text Format"
    "Object Descriptor"
    "CF_TEXT"
    "CF_UNICODETEXT"
    "CF_ENHMETAFILE"
    "CF_METAFILEPICT"
    "Link Source"
    "Link Source Descriptor"
    "ObjectLink"

    I don't know what is going on with "File Contents" - I get asked for it sometimes, but not other times. And when I am asked for it, it still won't pull the data down with it.

    So I'm back to ground zero. How can I pass a drag/drop something which includes content controls & charts in it (so RTF, HTML, etc won't work)? Any format will work as long as you tell me which one and what to place in it.

    thanks - dave

     


    Very funny video - What's your Metaphor?
    Thursday, February 17, 2011 9:31 PM
  • Hi;

    Any luck finding out what drag/drop format I should use to drop chart objects in a Word doc?

    thanks - dave


    Very funny video - What's your Metaphor?
    Sunday, February 27, 2011 4:17 PM
  • Hi;

    Any luck finding what format I can use to provide a drag/drop object that includes a chart?

    thanks - dave


    Very funny video - What's your Metaphor?
    Sunday, March 06, 2011 8:33 PM
  • Hey David,

    Unfortunately, I haven't been able to find what format you can use for the drag/drop.  The only suggestion I can think of is to open a paid support case to see if there is anything they can figure out for what format you can use.  Please visit the below link to see the various paid support options that are available to better meet your needs.

     http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

     

    Brandon

    Friday, March 11, 2011 5:29 PM
    Moderator
  • Bummer. Ok, I'll open a support ticket. We get 5 free a year so I guess we might as well use one :)
    Very funny video - What's your Metaphor?
    Saturday, March 12, 2011 10:55 PM
  • I don't have to do something similar (I'm consuming text dragged out of Word onto my Window) but I found this thread after searching for Woozle :)

    Anyway, you're asking an interesting and reasonable question.  Whilst I don't personally need the info, I was just curious if the support ticket you opened gave you any answers, and if so, what was the answer (file header, streamed contents of a .docx, something else?).

    Thanks!


    Ian Yates Technical Manager Medical IT Pty Ltd PO Box 501, Carina QLD 4152 Australia Web: www.medicalit.com.au
    Tuesday, April 12, 2011 5:54 AM
  • Hi Ian;

    The support ticket has been escalated so I'm still in the process of getting an answer. I'm guessing it will have to be escalated twice more before I get an answer :)

    thanks - dave


    Very funny video - What's your Metaphor?
    Tuesday, April 12, 2011 1:40 PM