C
Christian Herlambang
Hello,
After I've had some research in microsoft.public.powerpoint, I found
this code written by Shyam Pillai to extract Powerpoint speaker notes to
a text file.
--
Sub ReadText()
Dim shp As Shape
Dim sld As Slide
Open "c:\abc.txt" For Output As #1
On Error Resume Next
For Each sld In Application.ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
If shp.TextFrame.HasText Then
Print #1, shp.TextFrame.TextRange
End If
End If
Next
Next
Close #1
End Sub
--
It works well in VBA. Now I want to port it to C# .NET. Not having
enough experience and knowledge in C# .NET, I'd like to ask anyone who
can help me translating that code.
Michael Brown wrote in:
http://groups.google.com/groups?q=m...=#[email protected]&rnum=1
That this code should do the job:
--
foreach (PowerPoint.Shape sh in
ppPres.Slides.Range(curSlide).NotesPage.Shapes)
if (MsoTriState.msoTrue == sh.HasTextFrame)
if (MsoTriState.msoTrue == sh.TextFrame.HasText)
Console.WriteLine(sh.TextFrame.TextRange.Text);
--
But I couldn't make it running in my program. Any Hint?
Thank you in advanced.
Christian Herlambang
After I've had some research in microsoft.public.powerpoint, I found
this code written by Shyam Pillai to extract Powerpoint speaker notes to
a text file.
--
Sub ReadText()
Dim shp As Shape
Dim sld As Slide
Open "c:\abc.txt" For Output As #1
On Error Resume Next
For Each sld In Application.ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
If shp.TextFrame.HasText Then
Print #1, shp.TextFrame.TextRange
End If
End If
Next
Next
Close #1
End Sub
--
It works well in VBA. Now I want to port it to C# .NET. Not having
enough experience and knowledge in C# .NET, I'd like to ask anyone who
can help me translating that code.
Michael Brown wrote in:
http://groups.google.com/groups?q=m...=#[email protected]&rnum=1
That this code should do the job:
--
foreach (PowerPoint.Shape sh in
ppPres.Slides.Range(curSlide).NotesPage.Shapes)
if (MsoTriState.msoTrue == sh.HasTextFrame)
if (MsoTriState.msoTrue == sh.TextFrame.HasText)
Console.WriteLine(sh.TextFrame.TextRange.Text);
--
But I couldn't make it running in my program. Any Hint?
Thank you in advanced.
Christian Herlambang