#1
|
|||
|
|||
Name slides in PPT with VBA, or have an index?
Hello,
I am working with an excel document with about 100 marlett checkboxes, aka 100 topics. The back end of this process works with Word macros to deliver a write up to a customer based on the topics they select. I would also like on the front end to develop a macro in excel, to work with a PPT library. See image below: In this example I have a PPT with slides already created that correspond to the 10 options. I want to do one of two things: Copy that master slide deck, and erase the slides not selected. Open the master slide deck, copy the two options (Similar Web and Uber Suggest) into a new PPT presentation. I know I can reference slide locations using integers, but can I somehow name slides? This becomes quite an administrative task once you talk about 100 different options. Cross posted at Name slides in PPT with VBA, or have an index? |
#2
|
|||
|
|||
You can name the selected slide easily
Code:
ActiveWindow.Selection.SlideRange(1).name="myName" Code:
ActivePresentation.Slides("myName") |
#3
|
|||
|
|||
Quote:
Thank you for this. Great info. Now what if I hand this project off to someone and they have no idea what I named my 100 slides. Is there code that will list the names of ALL slides? Or better yet all slides, and the index (position) of said slides? |
#4
|
|||
|
|||
Try something based on this:
Code:
Sub readem() Dim osld As Slide Dim strReport As String Dim inum As Integer Dim strFileName inum = FreeFile strFileName = Environ("TEMP") & "\data.txt" For Each osld In ActivePresentation.Slides strReport = strReport & "Slide Index: " & osld.SlideIndex & vbTab _ & "Name: " & osld.Name & vbCrLf Next osld Open strFileName For Output As inum Print #inum, strReport Close inum Call Shell("NOTEPAD.EXE " & strFileName, vbNormalFocus) End Sub |
#5
|
|||
|
|||
Quote:
Thank you so much. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can a I create an index in a word document where index entries control sections of the document? | pfriorda | Word | 3 | 12-28-2017 08:02 PM |
Get Paragraph index from bookmark starting index | vince692 | Word VBA | 6 | 05-13-2016 04:51 AM |
Pulling Specific Slides from a Deck to create new slides | ColinW | PowerPoint | 2 | 07-17-2015 11:30 AM |
Difference between Slides.addSlide and Slides.Add? | tinfanide | PowerPoint | 3 | 12-29-2012 11:55 PM |
Inserting slides between existing slides in 2003 | watsonstudios | PowerPoint | 1 | 05-20-2011 08:15 PM |