Emptying the Office Clipboard Programmatically

March 13th, 2010
  • Windows XP PowerPoint 2002 (SP2)

    Hello All,

    I have a VC++ 6.0 kiosk application that uses PowerPoint
    2002. During execution the application copies and pastes
    slides from one presentation to another. It can run for
    several weeks and during this time may copy and paste
    hundreds of slides. It uses the SlideRange collection's
    Copy method and the Slides collection's Paste method to do
    this.

    During testing we have found that everytime a copy and
    paste is done, PowerPoint gradually increases its memory
    usage (from 8MB up to approx. 130MB) until eventually the
    Paste method fails with a run time error (16389).

    I presume this is occurring because the Office Clipboard
    is filling up with all the copying and pasting that's
    being done. My question is does anyone know how to
    programmatically clear out the Office Clipboard? We have
    tried emptying the Windows clipboard but this has no
    effect.

    Regards
    Martin


  • I was afraid that would be the case. Unfortunately, if Shyam's fix didn't do it, nothing will. He is one of the the main gurus of that stuff.

    No one has been able to track down the memory leak at all, so it is generally considered a good idea to restart any continous PowerPoint task at least once an hour.

    If I hear any more on any kind of workaround, I will let you know.


  • Martin,
    I think you got the answer over on the PowerPoint newsgroup, but just in case you didn't see it it canb e found via Google Groups at Tiny URL For Martin (http://tinyurl.com/icur)

    Basically, the most recent information is that the registry key information is on Shyam's site.


  • Unfortunately, Shyam's suggestion didn't work. PowerPoint still gradually leaks memory after each cut and paste. In fact, setting the AcbControl key in the registry to 1 seemed to have no effect.

    The only work around we can think of is to periodically (every 24 hours) get our C++ application to close PowerPoint and then re-open it.


  • Thanks for your help.

    Regards
    Martin







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Emptying the Office Clipboard Programmatically , Please add it free.