将Html文本导出到powerpoint [英] export Html text to powerpoint

查看:91
本文介绍了将Html文本导出到powerpoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft.Office.Interop.PowerPoint动态创建ppt幻灯片

它创建正常。



我想要为该幻灯片中的文本添加一些格式。



例如:,这是测试

我想''测试''是粗体。

所以当我试图给label1.TextFrame.TextRange.Text =< b> test< / b>使用html标签,它按原样显示,但不是粗体。

如何在我的情况下将HTML文本导出到powerpoint?

请尽快帮助并提前感谢

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

推荐答案

你好,



我找到了几种方法。首先要尝试的是将HTML文本复制到剪贴板(Clipboard.SetText(hello); - 您需要使用System.Windows.Forms或System.Windows命名空间)并将其粘贴为HTML PowerPoint.TextRange.PasteSpecial() [ ^ ]你可以在哪里设置文本的格式。

我不知道这个解决方法是否可以完成这项工作,因为与word不同,powerpoint文档不是基于HTML语言。



欢呼,

Marco Alessandro Bertschi
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


这篇关于将Html文本导出到powerpoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆