Log in

View Full Version : [SOLVED:] Import from Excel to PPT MasterSlide VBA works in SldShow, but NOT appear until exit



ned cox
09-14-2021, 02:16 AM
As an educator, I use PPT for class. I want a list of names to drop down on any slide of a multi-slide PPT, so using MasterSlide(1)Layout(4). Slide space is limited and I have similar dropdowns on normal slides already using the
same basic method which works in Slide Show Mode.

The problem (or, PPT limitation) is this works, but NOT without exiting the Slideshow and re-starting. Most useful
to my situation is to have the list appear while continuing in SlideShow. Code:

Sub ImportNames()
Dim xlsWB As Object
Set xlsWB = CreateObject("Excel.Application").Workbooks.Open(ActivePresentation.Path & "\StretchW59JH381.xlsx")

ActivePresentation.Designs(1).SlideMaster.Shapes("T_1").TextFrame.TextRange = xlsWB.Worksheets(1).Range("B3")

Set xlsWB = Nothing
End Sub

Any solution or concrete answer would be much appreciated!

ned cox
09-19-2021, 07:50 AM
As an educator, I use PPT for class. I want a list of names to drop down on any slide of a multi-slide PPT, so using MasterSlide(1)Layout(4). Slide space is limited and I have similar dropdowns on normal slides already using the
same basic method which works in Slide Show Mode.

The problem (or, PPT limitation) is this works, but NOT without exiting the Slideshow and re-starting. Most useful
to my situation is to have the list appear while continuing in SlideShow. Code:

Sub ImportNames()
Dim xlsWB As Object
Set xlsWB = CreateObject("Excel.Application").Workbooks.Open(ActivePresentation.Path & "\StretchW59JH381.xlsx")

ActivePresentation.Designs(1).SlideMaster.Shapes("T_1").TextFrame.TextRange = xlsWB.Worksheets(1).Range("B3")

Set xlsWB = Nothing
End Sub

Any solution or concrete answer would be much appreciated!

I was about to write an angry reply and say, "Thanks a lot for the help!" As you can see no one posted anything here!
However, that would NOT be entirely true. In fact, 2 posts north of here John Wilson posted a solution: "Not exactly scientific but it seems to work." This solution got me to thinking about my problem - it's somewhat similar. BINGO!

The above code works on masterlayouts in Slideshow mode after adding the following at the tail end of the sub:

ActivePresentation.Designs(1).SlideMaster.CustomLayouts(4).Shapes("T_1").Visible = True

Thanks a million!