Reputation: 611
I am writing a small plugin on ASP.NET C# VSTO and I want to be able to capture slide number and title of the slides when a slideshow is happening.
Can someone share sample code to capture title of the slide and slide number?
Upvotes: 1
Views: 2505
Reputation: 611
PowerPoint.SlideShowWindow.Presentation.SlideShowWindow.View.CurrentShowPosition
Upvotes: 1
Reputation: 29155
Capture event SlideShowNextSlide
and from the Wn
variable, get the slide's index/title. Here's a VBA example:
Private Sub app_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
Dim s As Slide
s = Wn.View.Slide
Dim slideTitle As String
If s.Layout <> ppLayoutBlank Then
If s.Shapes.HasTitle Then
slideTitle = s.Shapes.Title
Else
slideTitle = "(nothing)"
End If
End If
Dim sIndex As Integer
sIndex = s.SlideIndex
End Sub
Upvotes: 0
Reputation: 1
Presentation pres = Globals.ThisAddIn.Application.ActivePresentation;
foreach (Slide s in pres.Slides)
{
MessageBox.Show(s.SlideIndex);
}
The Slide title I don't know, yet
Upvotes: 0