Export powerpoint slide notes with formatting

R

rifferte

I have a program that extracts slides and notes from PPTs and stores them
into a database. The app can then create new slides from the images and notes
stored in the database and create a new PPT.

While this is working fine, one issue that I cannot solve is extracting PPT
note text while retaining the formatting. I believe that PPT stores the notes
in some rich text format, but exporting them seems to remove any formatting.

I am really stumped . . .
 
S

Steve Rindsberg

I have a program that extracts slides and notes from PPTs and stores them
into a database. The app can then create new slides from the images and notes
stored in the database and create a new PPT.

While this is working fine, one issue that I cannot solve is extracting PPT
note text while retaining the formatting. I believe that PPT stores the notes
in some rich text format, but exporting them seems to remove any formatting.

I am really stumped . . .

Depending on how you're getting the text from one place to another, it may be a
matter of copy/paste.

TheShape.TextFrame.TextRange.Copy puts fonted text on the clipboard; you can
paste it into an RTF container like WordPad and retain the fonts and sizing,
though not the paragraph/line spacing.

You can iterate through the .Runs collection to get the font and other local
formatting for each bit of text that's formatted differently from the rest and
iterate through the .Paragraphs collection to get spacing, but what you do with
the information will depend on where you store it and how.
 
R

rifferte

What about handling this through C#? Should I automate the copy procedure you
mentioned and then copy to something like word pad and save the file for
later use?
 
S

Steve Rindsberg

What about handling this through C#?

Not a clue, I'm afraid. I don't use it.
Should I automate the copy procedure you
mentioned and then copy to something like word pad and save the file for
later use?

I wasn't suggesting that you actually use WordPad; it's a handy tool to help figure
out what PPT/your code has put on the clipboard, that's all.

But it does illustrate another point: if you store the text in a way that allows
for rich formatting (as does WordPad) you can probably retain at least some if not
all of the formatting from PPT. Otherwise, all bets are off; contrast what happens
in WordPad with what you get from pasting into NotePad, for example.
 

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