Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Wed Feb 04, 2015 5:54 pm

Hello.

In spire.Presentation, How can I hyperlink on text not on textframe?

jslee@lawkorea.com
 
Posts: 2
Joined: Wed Feb 04, 2015 8:41 am

Thu Feb 05, 2015 2:37 am

Hello,

Thanks for your inquiry.

Please refer to the code below to meet your requirement.
Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile("Test.pptx", FileFormat.Pptx2010);
IAutoShape shape = ppt.Slides[0].Shapes[0] as IAutoShape;
foreach (TextParagraph tp in shape.TextFrame.Paragraphs)
{
    foreach (TextRange tr in tp.TextRanges)
    {
        ClickHyperlink ch = new ClickHyperlink("http://www.e-iceblue.com");
        tr.ClickAction = ch;
    }
}
ppt.SaveToFile("Sample.pptx", FileFormat.Pptx2010);
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Feb 05, 2015 2:56 am

Hello,

No,

In case TextFrame contains "this is a outlink test" string,

I want to hyperlink on string "outlink" not on "this is a outlink test" string.

Thanks a lot.

Best Regards,

jslee

jslee@lawkorea.com
 
Posts: 2
Joined: Wed Feb 04, 2015 8:41 am

Thu Feb 05, 2015 7:34 am

Hello,

We will do some investigation about this function and let you know ASAP.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Fri Feb 06, 2015 8:39 am

Hello,

Sorry that Spire.Presentation doesn't support add hyperlink to the portions of text when loading an exist document. Our dev team have added it to the new feature schedule, we will inform you if there is any update.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Presentation