Click here to Skip to main content
12,815,120 members (38,207 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
i am creating ppt slide dynamically by using Microsoft.Office.Interop.PowerPoint
it is creating fine.

I want to add some formatting to the text in that slide.

for eg:, This is test
I want to 'test' be in bold.
so when i am trying to give label1.TextFrame.TextRange.Text = "<b>test</b>" with html tags , it is displaying as is, but not bold.
How can I export HTML text to powerpoint in my case?
please help ASAP and thanks in advance
Posted 2-Jan-13 3:41am
Sandeep Mewara 2-Jan-13 23:14pm
I doubt if you can. Lets see if someone has other opinion.
Marco Alessandro Bertschi 11-Jan-13 10:37am
I have. But I have some doubts too because of the basic concept of MS PowerPoint.

Marco Alessandro Bertschi

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi there,

I found several ways to do this. First thing to try is copying the HTML text to your clipboard (Clipboard.SetText("hello"); -You'll need to use the System.Windows.Forms or System.Windows namespaces for that) and paste it as HTML with PowerPoint.TextRange.PasteSpecial()[^] where you can set the format of the text.
I don't know if this workaround will do the job because in difference to word, powerpoint documents are not based on the HTML language.

Marco Alessandro Bertschi

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100