Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Image Item not collected: format not supported by office clipboard

Back to Forum: Tech Off
  • User profile image
    ramaT

    Hi,

     

    I'm trying to copy image into clipboard collection. I can able to copy using Clipboard class methods: SetImage, SetDataObject, SetData. But unable to place in office clipboard collection. A following message displaying like "Item not collected: format not supported by office clipboard".

     

    My API (MyPage.Bitmap) returns BitmapSource and I used following method to copy image:

     

    Clipboard

     

    Has anyone else had issues similar to mine, and  how did you overcome them?

     

    All comments are gladly received.

     

    Regards,

    RamaS

    .SetImage(CurrentPage.Page.Bitmap);

     

     

  • User profile image
    itsnotabug

    can you post your code?

     

    i had problems with the clipboard before but worked around it by using word interop + doc.append. it required an additional save of a temp word doc that only held the image. not ideal but it got it off my plate (may not work in your situation).

  • User profile image
    ramaT

    itsnotabug said:

    can you post your code?

     

    i had problems with the clipboard before but worked around it by using word interop + doc.append. it required an additional save of a temp word doc that only held the image. not ideal but it got it off my plate (may not work in your situation).

    Hi,

     

    Thanks for the reply.

    even i did small work around, even i can't able to add in clipboard collection

     

    using(Image img=Image.FromStream(new MemoryStream(MyPage.Data)))

    {

       img.Save(@"c:\tmpImg.jpg",ImageFormat.Jpeg);

       Clipboard.SetDataObject(img,true);

    }

     

     

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.