Spire.Presentation for .NET 是专业的 PowerPoint组件,开发者可以在 .NET 平台上对 PPT文档进行生成、修改、转换和打印等操作,而无需安装 Microsoft PowerPoint。
这么优秀的国产工具怎能错过呢!软件国产化服务季!全线产品均享85折起,查看优惠价格!想要获取更多福利的朋友咨询在线客服哦~
C#
using Spire.Presentation;using Spire.Presentation.Diagrams;namespace SmartArt{ class Program { static void Main(string[] args) { //创建Presentation实例 Presentation ppt = new Presentation(); //加载PPT文档 ppt.LoadFromFile("SmartArt.pptx"); //获取第一张幻灯片 ISlide slide = ppt.Slides[0]; //获取SmartArt图形 ISmartArt smartArt = slide.Shapes[0] as ISmartArt; //添加指向 页的超链接到SmartArt图形的第一个节点 smartArt.Nodes[0].Click = new ClickHyperlink("https://www.e-iceblue.com"); //添加指向文档中指定幻灯片的超链接到SmartArt图形的第二个节点 smartArt.Nodes[1].Click = new ClickHyperlink(ppt.Slides[1]); //保存结果文档 ppt.SaveToFile("Result.pptx", FileFormat.Pptx2013); } }}
VB.NET
Imports Spire.PresentationImports Spire.Presentation.DiagramsNamespace SmartArt Class Program Private Shared Sub Main(ByVal args As String()) Dim ppt As Presentation = New Presentation() ppt.LoadFromFile("SmartArt.pptx") Dim slide As ISlide = ppt.Slides(0) Dim smartArt As ISmartArt = TryCast(slide.Shapes(0), ISmartArt) smartArt.Nodes(0).Click = New ClickHyperlink("https://www.e-iceblue.com") smartArt.Nodes(1).Click = New ClickHyperlink(ppt.Slides(1)) ppt.SaveToFile("Result.pptx", FileFormat.Pptx2013) End Sub End ClassEnd Namespace
效果图

是E-iceblue官方友好合作伙伴,如果您对spire.presentation感兴趣,可以联系在线客服了解具体授权价格和使用机制。
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!