Results 1 to 7 of 7

VBA to create userform that shows source excel files in PPT presentation (64-bit)

Threaded View

Sizzlechest VBA to create userform that... 06-04-2016, 08:54 PM
dflak Re: VBA to create userform... 06-07-2016, 11:46 AM
Sizzlechest Re: VBA to create userform... 06-08-2016, 02:40 PM
dflak Re: VBA to create userform... 06-08-2016, 03:26 PM
Sizzlechest Re: VBA to create userform... 06-08-2016, 03:46 PM
dflak Re: VBA to create userform... 06-08-2016, 03:53 PM
Sizzlechest Re: VBA to create userform... 06-08-2016, 04:27 PM
  1. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,958

    Re: VBA to create userform that shows source excel files in PPT presentation (64-bit)

    I don't know if this is what you want
    Dim MyPath As String
    Dim FileName As String
    
    Dim objPPT As Object
    Dim ppt As Object
    Dim sld As Object
    Dim shp As Object
    Dim PPName As String
    
    Dim sh As Excel.Worksheet
    Dim RowNum As Long
    
    Set sh = Sheets("Sheet1")
    RowNum = 2
    
    MyPath = ThisWorkbook.Path
    PPName = MyPath & "\" & Range("Rpt_Name")
    
    ' Open the PowerPoint Presentation
    Set objPPT = CreateObject("PowerPoint.Application")
    objPPT.Visible = True
    objPPT.presentations.Open PPName
    
    Set ppt = objPPT.activepresentation
    
    sh.Cells.ClearContents
    RowNum = 2
    
    For Each sld In ppt.slides
        For Each shp In sld.Shapes
            sh.Cells(RowNum, 1) = sld.Name
            sh.Cells(RowNum, 2) = shp.Name
            If shp.Type = msoLinkedOLEObject Then
                sh.Cells(RowNum, 3) = shp.LinkFormat.sourcefullname
            End If
            RowNum = RowNum + 1
        Next
    Next
    
    ppt.Close
    Set ppt = Nothing
    objPPT.Quit
    Set objPPT = Nothing
    Attached Files Attached Files
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 08-05-2015, 11:45 PM
  2. how to create an I&E presentation using formatted lookups
    By ammartino44 in forum Excel General
    Replies: 1
    Last Post: 07-27-2015, 08:45 PM
  3. Formula shows #value! error when source cell is empty
    By tstowe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2012, 10:22 AM
  4. Automating data import from multiple xls files to create 1 data source.
    By Anthem12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2012, 05:00 PM
  5. Replies: 9
    Last Post: 05-17-2012, 09:36 AM
  6. Replies: 1
    Last Post: 04-02-2012, 03:57 PM
  7. [SOLVED] How Do I create a table in excel that shows frequency?
    By petlesbian in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-09-2006, 01:20 PM

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