PPT notes

  • Thread starter Thread starter Prithvis
  • Start date Start date
P

Prithvis

Hi,

I am writing a piece of code to extract the powerpoint speaker notes
and display them in a html file. I am able to extract the speaker notes
from the slides by using sh.TextFrame.TextRange.Text . Though I am
getting the text, all the formatting bullets are lost. How do I retain
the formatting while displaying the speaker notes in the html.

-Prithvis
 
Prithvis said:
Hi,

I am writing a piece of code to extract the powerpoint speaker notes
and display them in a html file. I am able to extract the speaker notes
from the slides by using sh.TextFrame.TextRange.Text . Though I am
getting the text, all the formatting bullets are lost. How do I retain
the formatting while displaying the speaker notes in the html.

Unless somebody comes up with something insanely clever, you'll have to step
through the .TextRange.Paragraphs collection to get the indent level of each
paragraph and use that information to decide what bullet level to use.
 
Hi Steve,

Thanks for your replay. I will try doing this. Is there a way to retain
other formattings like Fonts Bold, Italic etc. What I had observe when
you save the ppt as web page it retains all the formatting and all
these ppt formatting gets converted to a CSS file which the html used.
My requirement is just to display the speaker notes with formatting in
a html document.

Your advice or suggestion would be a great help for me.

Thanks
Prithvis
 
Prithvis said:
Hi Steve,

Thanks for your replay. I will try doing this. Is there a way to retain
other formattings like Fonts Bold, Italic etc. What I had observe when
you save the ppt as web page it retains all the formatting and all
these ppt formatting gets converted to a CSS file which the html used.
My requirement is just to display the speaker notes with formatting in
a html document.

While the Save As Web page feature does retain a lot of the formatting, it also
results in very complex HTML. If you can make any sense of it, and if it helps
get the job done, my hat's off to you. ;-)

But you can certainly get at the formatting from within PPT.

The .TextRange object has a .Runs collection
Each .Run represents an identically formatted set of text, or to put it
differently, each time the text formatting changes (bold, ital, font, color,
whatever), it creates a new run.

You can iterate through the .Runs collection to get the formatting for each run

For example, if you have a reference to a shape, oSh

With oSh.TextFrame.TextRange
For X = 1 to .Runs.Count
With .Runs(X)
Debug.Print .Font.Name
Debug.Print .Bold
'' etc
End With
Next ' Run
End With
 
Steve,

Hat's off to you. The problem resolved. I got all the information that
I wanted. This is really great. I was struggling so much, you just
solve it with 2 lines.

-Prithvis
 
Steve,

I am able to get all the formatting that I need and also able to
convert those to html. I have one last and major problem. How do I
detect and convert the bullets from ppt to html. I have nested bullets.

I know you are the only person here who can help me out... :)

-Prithvis
 
Prithvis said:
Steve,

Hat's off to you. The problem resolved. I got all the information that
I wanted. This is really great. I was struggling so much, you just
solve it with 2 lines.

Ah, super. Thanks for letting me know.
 
Prithvis said:
Steve,

I am able to get all the formatting that I need and also able to
convert those to html. I have one last and major problem. How do I
detect and convert the bullets from ppt to html. I have nested bullets.

I know you are the only person here who can help me out... :)

Nah, Shyam and Chirag and Bill and Bill and Mike and the other *smart* ones are
asleep or busy. You're stuck with me.

Let's look at where you expect to go ...

You can't duplicate PPT's bullets in straight HTML, which only gives you a
choice of what, three bullet styles or so? And any color you like so long as
it's the same as the text.
 
Steve,

I see, but I see only you as my life saver now... others too far to
reach out :)

Can you tell me how do I get simple 2 level bullets (number and
unnumbered). Thats it what I want to do with these crazy bullets.

-Prithvis
 
Prithvis said:
Steve,

I see, but I see only you as my life saver now... others too far to
reach out :)

Can you tell me how do I get simple 2 level bullets (number and
unnumbered). Thats it what I want to do with these crazy bullets.

In HTML?

<ul>
<li>This is bulleted text</li>
<li>So is this</li>
<ul>

Substitute <ol> for <ul> and you get numbers.

Lists can contain lists:

<ul>
<li>Here's a bulleted point</li>

<ol>
<li>And here's a level two point, numbered</li>
<li>Number two goes here</li>
</ol>

<li>Now we're back to top level bulleted text</li>
</ul>


To convert from notes to something like the above, you pretty much have to
track the indent level of the paragraphs and each time the indent level
changes, either add a new <ul> level or end it with </ul> depending on whether
the indent level of the notes text increased or decreased.
 

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

Back
Top