Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert object from another presentation VBA (VBA/Powerpoint/2000)

    Hi.
    I've created a simple bit of code that opens a presentation, copies a specified chart, closes that presentation, and pastes it into the users slide.

    what I was wondering is, firstly, is this the most efficient way of doing this, and secondly, if it is, how to I stop the file that the code opened appearing in the "recent documents" bit of the file menu?

    Many thanks

    Thom

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Insert object from another presentation VBA (VBA/Powerpoint/2000)

    You can open the other presentation invisibly. This takes up fewer resources and avoids adding the filename to the most recently used list.
    <code>
    Dim prs As Presentation
    Set prs = Presentations.Open(FileName:="OtherPresentation.pp t", WithWindow:=False)
    ' code to copy a chart goes here
    ...
    prs.Close
    Set prs = Nothing</code>

  3. #3
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert object from another presentation VBA (VBA/Powerpoint/2000)

    Brilliant Hans.

    Many thanks.

    Thom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •