Text Extraction

  • Thread starter Christian Herlambang
  • Start date
C

Christian Herlambang

Hello,

I've succesfully extracted text/speaker notes in PowerPoint into one
file(*.txt).Now I would like to extract each slide into different files
with [SlideNumber].txt as file name.

text in slide 1--> 1.txt
text in slide 2--> 2.txt
....


Extraction to a file in C# .NET

foreach(PowerPoint.Slide sld in oPPT.ActivePresentation.Slides)
foreach(PowerPoint.Shape shp in sld.Shapes)
if(Microsoft.Office.Core.MsoTriState.msoTrue == shp.HasTextFrame)
if(Microsoft.Office.Core.MsoTriState.msoTrue == shp.TextFrame.HasText)
Console.WriteLine(sh.TextFrame.TextRange.Text);

I know it should be not that difficult, but maybe someone could help me
with a quick solution.

Thanks in Advance.


Christian Herlambang
 
S

Steve Rindsberg

Hello,

I've succesfully extracted text/speaker notes in PowerPoint into one
file(*.txt).Now I would like to extract each slide into different files
with [SlideNumber].txt as file name.

text in slide 1--> 1.txt
text in slide 2--> 2.txt
....

Extraction to a file in C# .NET

foreach(PowerPoint.Slide sld in oPPT.ActivePresentation.Slides)
foreach(PowerPoint.Shape shp in sld.Shapes)
if(Microsoft.Office.Core.MsoTriState.msoTrue == shp.HasTextFrame)
if(Microsoft.Office.Core.MsoTriState.msoTrue == shp.TextFrame.HasText)
Console.WriteLine(sh.TextFrame.TextRange.Text);

I know it should be not that difficult, but maybe someone could help me
with a quick solution.

What problem(s) have you run into, Christian?

I don't do C# or .Net but the above looks about right.

Use

sld.SlideIndex for the ordinal number of the slide within the presentation.
sld.SlideNumber for the number that will print as the slide's page number
(different from ordinal number if the user has set slide numbering to start at
something other than 1)






--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top