Click here to Skip to main content
Rate this: bad
good
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 2:41am
Comments
Sandeep Mewara at 2-Jan-13 23:14pm
   
I doubt if you can. Lets see if someone has other opinion.
Marco Alessandro Bertschi at 11-Jan-13 10:37am
   
I have. But I have some doubts too because of the basic concept of MS PowerPoint.
 
cheers
Marco Alessandro Bertschi

1 solution

Rate this: bad
good
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.
 
cheers,
Marco Alessandro Bertschi
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 379
1 Nirav Prabtani 266
2 Abhinav S 210
3 PIEBALDconsult 160
4 Dave Kreskowiak 155
0 OriginalGriff 7,545
1 Sergey Alexandrovich Kryukov 6,757
2 Maciej Los 3,909
3 Peter Leow 3,693
4 CHill60 2,712


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2014
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