hyperlinks

N

NigelGomm

if i have a slide in a presentation and i manually add a hyperlink (to the
second shape of the second slide) pointing to a slide in the same
presentation... where is the hyperlink info stored?


i have a slide with a hyperlink to another slide in the same presentation...
i can see (using a VBA Watch) the hyperlink in
..slides.item[2].hyperlinks.item[2].subaddress

if i then copy and paste that slide into a new presentation i can still see
(using VBA Watch) that subaddress in the new presentation but when i 'edit
hyperlink' it's empty (and doesn't do anything when i click on it in a
sideshow).

on the original slide (in the orginal presentation) i was expecting to find
it in
..slides.item[2].shapes.item[2].actionsettings[1].hyperlink.address
but that is empty


(using automation i'm trying to paste a slide into a new presentation and
keep hyperlinks to other slides in the same presentation active... the slide
may not be there when i paste but it will be when i've finished with the
presentation)

TIA

nigel
 
P

Peter Huang [MSFT]

Hi Nigel,

Based on my understanding, your scenario is as below.
You have two PPT, e.g. PPT A, PPT B.

In A, there is a slide with a hyperlink, when you copy and paste the slide
to PPT B, the new pasted slide's hyperlink will not work.(when you click on
it, it will not navigate).

If I have any misunderstanding, please feel free to post here.

Based on my test, I can not reproduce the problem.
Can you help to provide a simple reproduce PPT with the reproduce steps?(If
you have VBA code, please include in the PPT too)
Also I think you may try to do it by manually, i.e. select slide in A,
Ctrl+C, select PPT B, Ctrl+V to see if that works.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steve Rindsberg

if i have a slide in a presentation and i manually add a hyperlink (to the
second shape of the second slide) pointing to a slide in the same
presentation... where is the hyperlink info stored?

Neverland. And if you store too many there, sometimes Smee and Capt. Hook
catch them and feed them to the crocodile. Seriously, if there are too many
(or actually the total amount of data is over an ill-defined limit) they stop
working. But never mind that for now.
i have a slide with a hyperlink to another slide in the same presentation...
i can see (using a VBA Watch) the hyperlink in
..slides.item[2].hyperlinks.item[2].subaddress

if i then copy and paste that slide into a new presentation i can still see
(using VBA Watch) that subaddress in the new presentation but when i 'edit
hyperlink' it's empty (and doesn't do anything when i click on it in a
sideshow).

Suppose you have

PresA with 50 slides; on Slide 10 there's a link to Slide 50

You copy that slide to PresB with 100 slides; the link should still point to
slide 50, but slide 50 in PresB.

You copy that same slide 10 to PresC which only contains 30 slides and the link
ceases to work. There's no Slide 50 for it to link to so it *can't* point to
Slide 50.

You may need to do something like:

- Check the hyperlinks collection on each slide you need to copy
- If any hyperlink points to a slide within the current presentation, note the
slide number; if it's > previously noted hyperlink slide number, it becomes the
new "high water mark"
- Before copying, if there aren't enough slides in the target presentation to
preserve the link, add dummy slides.

Ugly, that.

Or perhaps iterate through the source slide's hyperlinks collection and apply
tags to the parent shape to preserve the link address, subaddress.

Then once done copying slides to the target presentation, look for tags and
reapply them as hyperlinks.

It gets a bit nastier than that because while one shape can have only one
hyperlink, a shape may also have a textframe containing multiple text ranges,
each of which has a hyperlink. And you can't tag each text range, only the
parent shape. Maybe store the count as a tag then give the individual tags
names like HlSubaddress & cstr(Count)
on the original slide (in the orginal presentation) i was expecting to find
it in
..slides.item[2].shapes.item[2].actionsettings[1].hyperlink.address
but that is empty

(using automation i'm trying to paste a slide into a new presentation and
keep hyperlinks to other slides in the same presentation active... the slide
may not be there when i paste but it will be when i've finished with the
presentation)

TIA

nigel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top