+ Reply to Thread
Results 1 to 4 of 4

macro for excel and powerpoint

  1. #1
    Registered User
    Join Date
    06-29-2007
    Posts
    18

    macro for excel and powerpoint

    Hi,

    Is it possible to build a macro that copies charts from excel and paste them into a powerpoint file ? If yes, how.

    any help is greatly appreciated
    thx
    marius

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    You need to make a reference to the Powerpoint object library in the VBA editor. This then exposes to Powerpoint objects to Excel for manipulation.

    A quick way of writing such a macro is to record the macro for slide creation in Powerpoint and then copy this code into Excel. By creating a PowerPoint object and using this to prefix the objects recorded should give you what you want.
    Martin

  3. #3
    Registered User
    Join Date
    11-25-2007
    Posts
    46

    Copy to powerpoint

    I found this just the other night. As mentioned you need to give the macro the reference to the Powerpoint libraries. See note in comments, in the Visual Basic editor select Tools, then Reference and then scroll down the list until you find "Microsoft Powerpoint....".

    You also have to provide the plot number to copy, this example it was plot #2 on the page. I have only been using for a few days, but working fine for me.

    You call this from your macro with the line below

    Copy_Paste_to_PowerPoint

    Hope this works for you

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-29-2007
    Posts
    18

    macro for both xls and ppt

    Thank you so much.
    Sorry it took me so long to answer you.
    mariusescu

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1