Anyone know how to get the count of hyperlinks for a slide?

M

Mike M.

In c++? <EG>
In VB it is: slide.Hyperlinks.Count but I am having trouble finding the c++
equivalent.

TIA
 
K

Kathy J

Gonna share? (Not that I will ever need it, just curious.)

--
Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote
Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books
Get PowerPoint answers at http://www.powerpointanswers.com
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
M

Mike M.

I actually cut the code to post but then I remembered nobody ever does this
stuff in c++. But since you asked, share my pain. There is no help for c++
so you have to dig through MS header files. Plus, it was fairly obvious
once I found it. <blush>

PowerPoint::HyperlinksPtr linksPtr;
PowerPoint::HyperlinkPtr aLinkPtr;

int linkCnt, nbrLinks; // Number of hyperlinks
// Get hyperlinks collection
linksPtr = pCurrentSlide->GetHyperlinks();
nbrLinks = linksPtr->Count;
 
K

Kathy J

Surprising as it may seem to some, that actually makes more sense than the
VBA version. Someday I am going to have to find time to start digging into
real languages again. Then again, maybe that's what husbands are for. "Hey
Bruce - Want a Project?" :)

--
Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote
Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books
Get PowerPoint answers at http://www.powerpointanswers.com
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
Top