none
Copy to clipboard limitation RRS feed

  • Question

  • Hello,

    I'd like to know what are the limitations of the clipboard.

    Because, I've been developping a software for my company that takes a template in Word/Excel and PowerPoint to make auto generated reports by replacing the picture every day and pasting the new graph and the picture which are in the template.

    But, I'm afraid, because it seems to exist some limitations

    CopyBitmapToClipboard
    ActiveWindow.View.PasteSpecial()
    When I copy a table/image into my clipboard and paste it in Word/Excel/PowerPoint it is fine, but if I have now 10 parallel reports which are generated at the same time and use the mechanism of copy paste, it will happen that it will copy it in the Word/Excel/PowerPoint that is currently being used by another report.

    Taking in consideration, I have 1 document, and the copy to clipboard of a table that is huge into powerpoint, would take the best case 1 second( which doesn't ), this would mean that in 1 day, I can generate a maximum of

    1 copy paste procedure = 1 second

    1minute = 60 second means 60 copy paste

    1hour = 60min x 60 copy paste

    1day = 24hours x 3600 copy paste

    Means I have a total of 86400 copy paste/reports. Which is impossible. A document will never take minimum of 1 second to be complete( for reports which are about 20 pages, powerpoint with 30 slides, excel worksheet with 6sheets ). How to avoid that the content copied into clipboard will be pasted in the wrong document, since both documents use the paste fonction.

    So, I'd like to know, if it is possible to give a reference into my clipboard, to tell him, to copy only the content inside his word/excel/powerpoint and not to copy what I just copied doing CTRL+C and to do CTRL+V in the wrong document?

    Monday, April 15, 2013 1:34 PM

Answers

  • Hi Mike

    You don't mention which version of Office or which file formats are involved, but the correct way to approach something of the magnitude you describe would be to use the Open XML SDK to work directly with the closed files, rather than trying to automate the Office applications. The supported file formats are those that end with a "x", such as docx, pptx, etc. (and not the old doc, ppt, etc.)

    Best place to get started is OpenXMLDeveloper.org


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by mike27015 Tuesday, April 16, 2013 8:35 AM
    Monday, April 15, 2013 3:27 PM
    Moderator

All replies

  • Hi Mike

    You don't mention which version of Office or which file formats are involved, but the correct way to approach something of the magnitude you describe would be to use the Open XML SDK to work directly with the closed files, rather than trying to automate the Office applications. The supported file formats are those that end with a "x", such as docx, pptx, etc. (and not the old doc, ppt, etc.)

    Best place to get started is OpenXMLDeveloper.org


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by mike27015 Tuesday, April 16, 2013 8:35 AM
    Monday, April 15, 2013 3:27 PM
    Moderator
  • Hello Cindy,

    I'm using Office 2010 / 2013.

    At the moment it works fine with the copy/paste procedure, but as mentioned arrived 86k documents per day, it won't work anymore.

    I've been looking around and found the same about Open XML SDK, and it seems to be the best solution.

    Thanks for the quick reply.

    ( By the way, I cannot reply on Firefox, need to use IE )

    Tuesday, April 16, 2013 8:34 AM
  • ( By the way, I cannot reply on Firefox, need to use IE )

    The same for me here - is that a known Problem of this Forum?
    Wednesday, May 29, 2013 7:45 AM