Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim oPowerPoint As PowerPoint.Application Dim oSlides As PowerPoint.Slides Dim oSlide As PowerPoint.Slide Dim oPres As PowerPoint.Presentations Dim oP As PowerPoint.Presentation Dim oShape As PowerPoint.Shapes Dim oSh As PowerPoint.Shape Dim strText As String Try oPowerPoint = CreateObject("PowerPoint.Application") oPowerPoint.Visible = True 'oP = oPowerPoint.Presentations.Open(FileName:=TextBox1.Text, WithWindow:=Microsoft.Office.Core.MsoTriState.msoFalse) oP = oPowerPoint.Presentations.Open(TextBox1.Text) oP = oP.Application.ActivePresentation oSlides = oP.Slides For Each oSlide In oSlides oShape = oSlide.NotesPage.Shapes For Each oSh In oShape If oSh.HasTextFrame Then If oSh.TextFrame.HasText Then strText = oSh.TextFrame.TextRange.Text MessageBox.Show(strText) End If End If Next Next oPowerPoint.Quit() oPowerPoint = Nothing Catch ex As Exception MessageBox.Show(ex.StackTrace) MessageBox.Show(ex.Message) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)