Hi David,
Presentation
pres = new Presentation(“D:\test.pptx”);<o:p></o:p>
foreach (Slide sld in pres.Slides)
{
//Get an Array of TextFrameEx objects from each slide
ITextFrame[] textFrames = Aspose.Slides.Util.SlideUtil.GetAllTextBoxes(sld);
//Loop through the Array of TextFrames
for (int i = 0; i < textFrames.Length; i++)
{
//Loop through paragraphs in current TextFrame
foreach (Paragraph para in textFrames[i].Paragraphs)
{
//Loop through portions in the current Paragraph
foreach (Portion port in para.Portions)
{
try
{
if (port.PortionFormat.AsIHyperlinkContainer.HyperlinkClick.ExternalUrl != null)
{
Console.WriteLine("Slide number " + sld.SlideNumber.ToString() + " has external hyperlink");
}
}
catch { }
}
}
}
}
Hi Adnan,
Hi David,
I have observed the sample code shared by you and like to share that it too is correct. However, I am unable to understand you following requirement.
DavidNaveen:
But not sure how to check how the external link is referred.
Can you please elaborate the requested information so that I may help you further in this regard.
Many Thanks,
Hi
Hi David,
Hi
Hi David,
As I shared in my previous post that in Aspose.Slides the hyperlink is available for any text or shape when it is set. So if there is an external hyperlink found, it is meant to be there. It’s not like that if there is an external hyperlink it is not available there. I hope this will clarify the concept to you.
Many Thanks,