+ Reply to Thread
Results 1 to 5 of 5

VBA to copy Excel data range and paste in PowerPoint text boxes

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    Chennai, India
    MS-Off Ver
    2013
    Posts
    5

    Question VBA to copy Excel data range and paste in PowerPoint text boxes

    Hello,

    I do not have much knowledge in VBA programming but would like to automate a repetitive task that I am doing every week.

    I need to copy a range of cells (horizontal/vertical range) with its font color from Excel and then paste them into PowerPoint Text boxes.

    I am currently manually copying each Excel cell and then pasting as values in each PPT textbox which is very time consuming and exhaustive, making my work prone to errors.

    If any of you VBA experts know of a simple code to achieve this, I kindly request you to share it with me.

    Thanks in advance for your amazing help

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VBA to copy Excel data range and paste in PowerPoint text boxes

    Here is some sample code on how to do it.

    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VBA to copy Excel data range and paste in PowerPoint text boxes

    Using vba to write to Powerpoint presentation requires that you add a reference to the Powerpoint object library - see pic below

    ReferencesToPowerpoint.jpg

    The way I would approach your problem

    1 List all existing textboxes that exist in the PP presentation (see code below)
    2 Rename the textboxes into something more meaningful (to make life easier in future!)
    3 Write a 2 column table in Excel with the (new)textbox names and cell Ref (= where the text to be copied is)
    4 Write vba procedure to transfer those values automatically

    If that sounds ok to you:
    1 open your PP presentation (which contains textboxes with latest text)
    2 open the attached file
    3 run the macro with {CTRL} + t

    Hopefully that will give you a list of your textboxes slide by slide

    If that works then we can quickly do steps 2,3 and 4
    Let me know what you think

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VBA to copy Excel data range and paste in PowerPoint text boxes

    An afterthought to post#3
    I am a creature of habit and favour writing my code in the Excel file. It could just as easily sit (with a few mods) in the PowerPoint file

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VBA to copy Excel data range and paste in PowerPoint text boxes

    A really easy way to keep everything updated without having to run any procedures is to copy the original text into Powerpoint using "Paste-Link"
    (this is more suited to charts, but can be used for text as well)
    - copies an image of a cell into Powerpoint and keeps the image updated if the value of the cell changes (updates links when PP file opened)
    - formatting is a bit limited because you are left with an image (of the whole cell) in PowerPoint
    - so best to format text size, font and colour in Excel
    - if you do not want a border around it, then remove gridlines on that sheet in Excel

    Method:
    1 Format the cell in Excel
    2 Select and copy the cell
    3 Activate the PowerPoint window
    4 Click on Home Tab
    5 In the Clipboard section, click on the down arrow, and then Paste Special
    6 In the pop-up box click on Paste Link and select Microsoft Excel Worksheet Object

    PasteSpecial.jpg
    Last edited by kev_; 11-29-2016 at 04:46 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy range in excel and paste in Powerpoint VBA
    By JeradAllan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2017, 08:49 AM
  2. Copy range of cell values from Excel to powerpoint text box and add position.
    By alfredo1971 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2016, 04:07 PM
  3. Copy and Paste Excel range as embedded table in Powerpoint (Mac)
    By OliverBrain in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-01-2015, 10:27 AM
  4. Excel data into text boxes in PowerPoint slides
    By cabroncito29 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2014, 03:48 PM
  5. Copy Excel text to Powerpoint text boxes
    By benihana269 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2013, 12:30 AM
  6. macro to copy paste excel name range to powerpoint new slide
    By koi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2013, 04:55 PM
  7. Replies: 2
    Last Post: 07-10-2006, 03:29 AM

Tags for this Thread

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