HELP to get TextFrame to HTML

  • Thread starter Thread starter Erik Berglund
  • Start date Start date
E

Erik Berglund

Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?
 
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?
 
Actually, I would like do do it using VBA and automatically do this
without having to save to files in the process. Any ideas?
 
Sorry, I'm not a VBA person.

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Actually, I would like do do it using VBA and automatically do this
without having to save to files in the process. Any ideas?
 
Actually, I would like do do it using VBA and automatically do this
without having to save to files in the process. Any ideas?

I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?
Michael Koerner said:
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?
 
Given a TextFrame in PowerPoint I would like to convert the content of
the TextFrame into matching HTML without having to save files and read
files. I found the HTMLProject and HTMLProjectItem objects that I can
use to get HTML from PowerPoint, though I had difficulty getting clear
HTML and not just specific PPT HTML. Also, they only work on a slide
granularity and not on a TextFrame level so performance was not that
good and it was not so easy to find the right subset of the HTML. At
the same time I'm guessing the content of the TextFrame is Unicode
text and that there may be more general conversion tools available or
that some other COM or ActiveX component could be used to get the
HTML. I have not yet found one, though. I did use the HTMLDocument
object from Microsoft HTML Objects library included in visual studio
6.0 but it only took care of breakes in the TextFrame.

Any clearer?

Cheers

Erik
I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?
Michael Koerner said:
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Given a TextFrame in PowerPoint I would like to convert the content of
the TextFrame into matching HTML without having to save files and read
files.

I still don't understand what that means, really. Perhaps an example of what you mean
would help. Do you want an html page that contains the same text as the text frame, or
an html page that duplicates the text, formatting and all? Or something entirely
different?

Extracting just the portion of html that relates to the specific text frame might or
might not be useful, as so much formatting etc. depends on CSS.

And again, this sounds like a solution to a problem, or at least a possible one. What's
the problem, though?
I found the HTMLProject and HTMLProjectItem objects that I can
use to get HTML from PowerPoint, though I had difficulty getting clear
HTML and not just specific PPT HTML. Also, they only work on a slide
granularity and not on a TextFrame level so performance was not that
good and it was not so easy to find the right subset of the HTML. At
the same time I'm guessing the content of the TextFrame is Unicode
text and that there may be more general conversion tools available or
that some other COM or ActiveX component could be used to get the
HTML. I have not yet found one, though. I did use the HTMLDocument
object from Microsoft HTML Objects library included in visual studio
6.0 but it only took care of breakes in the TextFrame.

Any clearer?

Cheers

Erik
I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?
"Michael Koerner" <[email protected]> wrote in message
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
I guess, in the end, I want automatic conversion from the Unicode text
in a TextFrame to HTML, possibly as a HTML page with inline CSS or
without the header information. I just do not want to do the tedious
conversion myself.

Steve Rindsberg said:
Given a TextFrame in PowerPoint I would like to convert the content of
the TextFrame into matching HTML without having to save files and read
files.

I still don't understand what that means, really. Perhaps an example of what you mean
would help. Do you want an html page that contains the same text as the text frame, or
an html page that duplicates the text, formatting and all? Or something entirely
different?

Extracting just the portion of html that relates to the specific text frame might or
might not be useful, as so much formatting etc. depends on CSS.

And again, this sounds like a solution to a problem, or at least a possible one. What's
the problem, though?
I found the HTMLProject and HTMLProjectItem objects that I can
use to get HTML from PowerPoint, though I had difficulty getting clear
HTML and not just specific PPT HTML. Also, they only work on a slide
granularity and not on a TextFrame level so performance was not that
good and it was not so easy to find the right subset of the HTML. At
the same time I'm guessing the content of the TextFrame is Unicode
text and that there may be more general conversion tools available or
that some other COM or ActiveX component could be used to get the
HTML. I have not yet found one, though. I did use the HTMLDocument
object from Microsoft HTML Objects library included in visual studio
6.0 but it only took care of breakes in the TextFrame.

Any clearer?

Cheers

Erik
I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?


"Michael Koerner" <[email protected]> wrote in message
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
I guess, in the end, I want automatic conversion from the Unicode text
in a TextFrame to HTML, possibly as a HTML page with inline CSS or
without the header information. I just do not want to do the tedious
conversion myself.

You might want to start then by looking at .Runs
Each .Run is more or less equivalent to a css span (ie, a series of characters whose
formatting differs in some way from the previous character or characters.

You could step through the .Runs collection and for each run, capture whatever
formatting attributes you want, then append something like this to the text you'd
already collected:

Steve Rindsberg <[email protected]> wrote in message
Given a TextFrame in PowerPoint I would like to convert the content of
the TextFrame into matching HTML without having to save files and read
files.

I still don't understand what that means, really. Perhaps an example of what you mean
would help. Do you want an html page that contains the same text as the text frame, or
an html page that duplicates the text, formatting and all? Or something entirely
different?

Extracting just the portion of html that relates to the specific text frame might or
might not be useful, as so much formatting etc. depends on CSS.

And again, this sounds like a solution to a problem, or at least a possible one. What's
the problem, though?
I found the HTMLProject and HTMLProjectItem objects that I can
use to get HTML from PowerPoint, though I had difficulty getting clear
HTML and not just specific PPT HTML. Also, they only work on a slide
granularity and not on a TextFrame level so performance was not that
good and it was not so easy to find the right subset of the HTML. At
the same time I'm guessing the content of the TextFrame is Unicode
text and that there may be more general conversion tools available or
that some other COM or ActiveX component could be used to get the
HTML. I have not yet found one, though. I did use the HTMLDocument
object from Microsoft HTML Objects library included in visual studio
6.0 but it only took care of breakes in the TextFrame.

Any clearer?

Cheers

Erik

I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?


"Michael Koerner" <[email protected]> wrote in message
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Thanks Steve,

Now we are getting somewhere. This runs-method really helps.


Steve Rindsberg said:
I guess, in the end, I want automatic conversion from the Unicode text
in a TextFrame to HTML, possibly as a HTML page with inline CSS or
without the header information. I just do not want to do the tedious
conversion myself.

You might want to start then by looking at .Runs
Each .Run is more or less equivalent to a css span (ie, a series of characters whose
formatting differs in some way from the previous character or characters.

You could step through the .Runs collection and for each run, capture whatever
formatting attributes you want, then append something like this to the text you'd
already collected:

Steve Rindsberg <[email protected]> wrote in message
Given a TextFrame in PowerPoint I would like to convert the content of
the TextFrame into matching HTML without having to save files and read
files.

I still don't understand what that means, really. Perhaps an example of what you mean
would help. Do you want an html page that contains the same text as the text frame, or
an html page that duplicates the text, formatting and all? Or something entirely
different?

Extracting just the portion of html that relates to the specific text frame might or
might not be useful, as so much formatting etc. depends on CSS.

And again, this sounds like a solution to a problem, or at least a possible one. What's
the problem, though?

I found the HTMLProject and HTMLProjectItem objects that I can
use to get HTML from PowerPoint, though I had difficulty getting clear
HTML and not just specific PPT HTML. Also, they only work on a slide
granularity and not on a TextFrame level so performance was not that
good and it was not so easy to find the right subset of the HTML. At
the same time I'm guessing the content of the TextFrame is Unicode
text and that there may be more general conversion tools available or
that some other COM or ActiveX component could be used to get the
HTML. I have not yet found one, though. I did use the HTMLDocument
object from Microsoft HTML Objects library included in visual studio
6.0 but it only took care of breakes in the TextFrame.

Any clearer?

Cheers

Erik

I don't quite understand what you want to end up with.
Can you describe it in more detail? Perhaps explain the problem this is to solve?


"Michael Koerner" <[email protected]> wrote in message
Have you tried publishing the presentation to HTML?

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Does anyone know of a automatic way to get HTML from a
PowerPoint.TextFrame or possibly TextRAnge. Including all hyperlinks
and style specification (font, color etc)?


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Back
Top