Linked Slide Object

C

CJL

I have a PowerPoint 2003 presentation that was given me. It has Quad charts
where 2 of the Quads are linked back to other slides in the presentation. If
you update the full page slides and then right click on the quad and choose
Update Link, the Quad updates.

I can not figure out how this is done so I can duplicate it. When I try to
insert an object - it appears that a New Slide Object can not be linked and
if you try to create a new object from file - you can't insert a presentation
into itself (not to mention how you would go about changing to the actual
slide).

When you look at the Links - the link is shown as the same file name with an
exclamation point and #s behind it.

Any ideas??

Thanks!
 
C

CJL

Oh - you totally rock - THANK-YOU!


Steve Rindsberg said:
Try it like so:

Put PPT in Slide Sorter view. Select the slide you want to link to and press
Ctrl+C to copy it.

Now go to the slide where you want to insert the linked slide, choose Edit,
Paste Special; put a check next to "Link" and OK the paste.

Say hello to your Uncle Bob.




==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/
 
R

Rob Risko

I'm working with a PowerPoint presentation where I would like to propogate a slide with Linked Slide Objects. I am able to do this with the below code.
The problem is, I do not know how to do 2 things. 1) Return the object reference (is this .shapes(?)) in order to resize and move the pastespecial objects so they are not overlayed
2) Edit the new shape so that it has a hyperlink "to a place in this document" as the slide just copied. I'm sure I can use the backupindex in some way for this but cannot reference the shape to set the hyperlink. This step is required so that during slide show, the presenter can see the available "backup" slides and click the object to jump to the slide.

' This clears the clipboard to prevent memory problems and is called in the propogate Sub
Private Declare Function OpenClipboard Lib "user32" (ByVal NewOwner As Long) As Boolean
Private Declare Function EmptyClipboard Lib "user32" () As Boolean
Private Declare Function CloseClipboard Lib "user32" () As Boolean

Function ClearClipboard() As Boolean
If OpenClipboard(0) Then
EmptyClipboard
CloseClipboard
End If
End Function


Private Sub propogateBackups_Click()

Dim backupSelectIndex, backupIndex, shapeIndex As Integer

' SlideID 767 is "Backup Slide" selection slide and is used to identify where to begin when creating the pastespecial linked shapes
backupSelectIndex = ActivePresentation.Slides.FindBySlideID(767).SlideIndex
backupIndex = ActivePresentation.Slides.FindBySlideID(767).SlideIndex

' My attempt to find the shape index of the newly created object/shape in order to resize and move--this used in a later step--I don't think this works correctly
shapeIndex = ActivePresentation.Slides(backupSelectIndex).Shapes.Count

' Loops for all Backup Slides and adds to Backup Selection Slide
Do
backupIndex = backupIndex + 1
shapeIndex = shapeIndex + 1

With ActivePresentation
.Slides(backupIndex).Copy
.Slides(backupSelectIndex).Shapes.PasteSpecial link:=msoTrue

' This does not work to change size/position--I need help with this
' .Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings (ppMouseClick)
' .Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Action = ppActionHyperlink
' .Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Hyperlink.Address = _
' .Slides(backupIndex)
' ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleHeight
' ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleWidth

End With

' Clear the Clipboard for memory considerations
Call ClearClipboard

' This step identifies a marker slide--all backup slides will be added between this slide and slides(767)
Loop Until ActivePresentation.Slides(backupIndex+1).SlideID = 749


End Sub


Right now this procedure works to copy and pastespecial each slide. But all slides are pasted in the same location and need to be in a 5x4 matrix with slides sized about 100 High, 120 Wide. Then I need to add the Hyperlink to a place in the activepresentation to the appropriate slides(backupIndex) that was just copied.
I know how to do this in the PPT document window wiht the various functions but I want to be able to run this during slide execution or at least run it each time a backup slide is added so that the new slide is part of the linked slides.

Thank you much...I know this isn't an easy problem. I've looked in many places to find a way to do this but cannot find a command or object commands to allow me to do this. I also experimented with creating a Dim currentSlide as slide and couldn't figure out how to modify the needed size/position parameters or then to paste it in the slide. I don't think the linked slide possibility exist (or pastespecial) when I do it that was. So the clipboard .copy and .pastespecial seem like the way to go.
I hope someone can think of a work around or show what I am missing!

Rob



CJ wrote:

Linked Slide Object
13-May-09

I have a PowerPoint 2003 presentation that was given me. It has Quad charts
where 2 of the Quads are linked back to other slides in the presentation. If
you update the full page slides and then right click on the quad and choose
Update Link, the Quad updates.

I can not figure out how this is done so I can duplicate it. When I try to
insert an object - it appears that a New Slide Object can not be linked and
if you try to create a new object from file - you can't insert a presentation
into itself (not to mention how you would go about changing to the actual
slide).

When you look at the Links - the link is shown as the same file name with an
exclamation point and #s behind it.

Any ideas??

Thanks!

EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorial...b-7374d3da3425/wpf-and-the-model-view-vi.aspx
 
D

David Marcovitz

You are almost there. First, take out this line:

..Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick)

It was supposed to have a With in front of it, but you don't need it because
you are not using the power of the With in here. Without the With, it will
not work, and with the With, you would have to modify a bunch of other
working stuff.

Next, you need something like this:


..Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick) _
.Hyperlink.SubAddress = _
.Slides(backupIndex).SlideID & "," & backupIndex & ","

Because you are linking to a slide within the presentation, you want to play
with the subaddress, not the address of the hyperlink. The subaddress is a
pointer to the slide within the presentation.

Other than that, I think it works.

--David


I'm working with a PowerPoint presentation where I would like to propogate a
slide with Linked Slide Objects. I am able to do this with the below code.
The problem is, I do not know how to do 2 things. 1) Return the object
reference (is this .shapes(?)) in order to resize and move the pastespecial
objects so they are not overlayed
2) Edit the new shape so that it has a hyperlink "to a place in this document"
as the slide just copied. I'm sure I can use the backupindex in some way for
this but cannot reference the shape to set the hyperlink. This step is
required so that during slide show, the presenter can see the available
"backup" slides and click the object to jump to the slide.

' This clears the clipboard to prevent memory problems and is called in the
propogate Sub
Private Declare Function OpenClipboard Lib "user32" (ByVal NewOwner As Long)
As Boolean
Private Declare Function EmptyClipboard Lib "user32" () As Boolean
Private Declare Function CloseClipboard Lib "user32" () As Boolean

Function ClearClipboard() As Boolean
If OpenClipboard(0) Then
EmptyClipboard
CloseClipboard
End If
End Function


Private Sub propogateBackups_Click()

Dim backupSelectIndex, backupIndex, shapeIndex As Integer

' SlideID 767 is "Backup Slide" selection slide and is used to identify where
to begin when creating the pastespecial linked shapes
backupSelectIndex =
ActivePresentation.Slides.FindBySlideID(767).SlideIndex
backupIndex = ActivePresentation.Slides.FindBySlideID(767).SlideIndex

' My attempt to find the shape index of the newly created object/shape in
order to resize and move--this used in a later step--I don't think this works
correctly
shapeIndex = ActivePresentation.Slides(backupSelectIndex).Shapes.Count

' Loops for all Backup Slides and adds to Backup Selection Slide
Do
backupIndex = backupIndex + 1
shapeIndex = shapeIndex + 1

With ActivePresentation
.Slides(backupIndex).Copy
.Slides(backupSelectIndex).Shapes.PasteSpecial link:=msoTrue

' This does not work to change size/position--I need help with this
' .Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings
(ppMouseClick)
'
.Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Act
ion = ppActionHyperlink
'
.Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Hyp
erlink.Address = _
' .Slides(backupIndex)
'
ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleHeight
'
ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleWidth

End With

' Clear the Clipboard for memory considerations
Call ClearClipboard

' This step identifies a marker slide--all backup slides will be added between
this slide and slides(767)
Loop Until ActivePresentation.Slides(backupIndex+1).SlideID = 749


End Sub


Right now this procedure works to copy and pastespecial each slide. But all
slides are pasted in the same location and need to be in a 5x4 matrix with
slides sized about 100 High, 120 Wide. Then I need to add the Hyperlink to a
place in the activepresentation to the appropriate slides(backupIndex) that
was just copied.
I know how to do this in the PPT document window wiht the various functions
but I want to be able to run this during slide execution or at least run it
each time a backup slide is added so that the new slide is part of the linked
slides.

Thank you much...I know this isn't an easy problem. I've looked in many
places to find a way to do this but cannot find a command or object commands
to allow me to do this. I also experimented with creating a Dim currentSlide
as slide and couldn't figure out how to modify the needed size/position
parameters or then to paste it in the slide. I don't think the linked slide
possibility exist (or pastespecial) when I do it that was. So the clipboard
.copy and .pastespecial seem like the way to go.
I hope someone can think of a work around or show what I am missing!

Rob



CJ wrote:

Linked Slide Object
13-May-09

I have a PowerPoint 2003 presentation that was given me. It has Quad charts
where 2 of the Quads are linked back to other slides in the presentation. If
you update the full page slides and then right click on the quad and choose
Update Link, the Quad updates.

I can not figure out how this is done so I can duplicate it. When I try to
insert an object - it appears that a New Slide Object can not be linked and
if you try to create a new object from file - you can't insert a presentation
into itself (not to mention how you would go about changing to the actual
slide).

When you look at the Links - the link is shown as the same file name with an
exclamation point and #s behind it.

Any ideas??

Thanks!

EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorials/aspnet/ec832ac7-6e4c-4ea8-81ab-7374d3da34
25/wpf-and-the-model-view-vi.aspx

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
D

David Marcovitz

Oh. One more thing. You had a problem with your scaling. I'm not sure what
you are trying to do there, but the ScaleHeight and ScaleWidth methods need
arguments to tell it how much to scale and whether to scale from the current
size or the original size. Usually, you just lock the aspect ratio and scale
the width, not both the width and the height.

Finally, to move the pictures, you need to deal with the .Top and .Left

Some of this stuff will be obvious if you go to the Debug menu and choose
Compile VBAProject.

--David

I'm working with a PowerPoint presentation where I would like to propogate a
slide with Linked Slide Objects. I am able to do this with the below code.
The problem is, I do not know how to do 2 things. 1) Return the object
reference (is this .shapes(?)) in order to resize and move the pastespecial
objects so they are not overlayed
2) Edit the new shape so that it has a hyperlink "to a place in this document"
as the slide just copied. I'm sure I can use the backupindex in some way for
this but cannot reference the shape to set the hyperlink. This step is
required so that during slide show, the presenter can see the available
"backup" slides and click the object to jump to the slide.

' This clears the clipboard to prevent memory problems and is called in the
propogate Sub
Private Declare Function OpenClipboard Lib "user32" (ByVal NewOwner As Long)
As Boolean
Private Declare Function EmptyClipboard Lib "user32" () As Boolean
Private Declare Function CloseClipboard Lib "user32" () As Boolean

Function ClearClipboard() As Boolean
If OpenClipboard(0) Then
EmptyClipboard
CloseClipboard
End If
End Function


Private Sub propogateBackups_Click()

Dim backupSelectIndex, backupIndex, shapeIndex As Integer

' SlideID 767 is "Backup Slide" selection slide and is used to identify where
to begin when creating the pastespecial linked shapes
backupSelectIndex =
ActivePresentation.Slides.FindBySlideID(767).SlideIndex
backupIndex = ActivePresentation.Slides.FindBySlideID(767).SlideIndex

' My attempt to find the shape index of the newly created object/shape in
order to resize and move--this used in a later step--I don't think this works
correctly
shapeIndex = ActivePresentation.Slides(backupSelectIndex).Shapes.Count

' Loops for all Backup Slides and adds to Backup Selection Slide
Do
backupIndex = backupIndex + 1
shapeIndex = shapeIndex + 1

With ActivePresentation
.Slides(backupIndex).Copy
.Slides(backupSelectIndex).Shapes.PasteSpecial link:=msoTrue

' This does not work to change size/position--I need help with this
' .Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings
(ppMouseClick)
'
.Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Act
ion = ppActionHyperlink
'
.Slides(backupSelectIndex).Shapes(shapeIndex).ActionSettings(ppMouseClick).Hyp
erlink.Address = _
' .Slides(backupIndex)
'
ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleHeight
'
ActivePresentation.Slides(backupSelectIndex).Shapes(shapeIndex).ScaleWidth

End With

' Clear the Clipboard for memory considerations
Call ClearClipboard

' This step identifies a marker slide--all backup slides will be added between
this slide and slides(767)
Loop Until ActivePresentation.Slides(backupIndex+1).SlideID = 749


End Sub


Right now this procedure works to copy and pastespecial each slide. But all
slides are pasted in the same location and need to be in a 5x4 matrix with
slides sized about 100 High, 120 Wide. Then I need to add the Hyperlink to a
place in the activepresentation to the appropriate slides(backupIndex) that
was just copied.
I know how to do this in the PPT document window wiht the various functions
but I want to be able to run this during slide execution or at least run it
each time a backup slide is added so that the new slide is part of the linked
slides.

Thank you much...I know this isn't an easy problem. I've looked in many
places to find a way to do this but cannot find a command or object commands
to allow me to do this. I also experimented with creating a Dim currentSlide
as slide and couldn't figure out how to modify the needed size/position
parameters or then to paste it in the slide. I don't think the linked slide
possibility exist (or pastespecial) when I do it that was. So the clipboard
.copy and .pastespecial seem like the way to go.
I hope someone can think of a work around or show what I am missing!

Rob



CJ wrote:

Linked Slide Object
13-May-09

I have a PowerPoint 2003 presentation that was given me. It has Quad charts
where 2 of the Quads are linked back to other slides in the presentation. If
you update the full page slides and then right click on the quad and choose
Update Link, the Quad updates.

I can not figure out how this is done so I can duplicate it. When I try to
insert an object - it appears that a New Slide Object can not be linked and
if you try to create a new object from file - you can't insert a presentation
into itself (not to mention how you would go about changing to the actual
slide).

When you look at the Links - the link is shown as the same file name with an
exclamation point and #s behind it.

Any ideas??

Thanks!

EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorials/aspnet/ec832ac7-6e4c-4ea8-81ab-7374d3da34
25/wpf-and-the-model-view-vi.aspx

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
J

James

Hi

I've just played around with this a bit and come up with a different way
of identifying the slides/shapes which I think is neater. But there are
many ways to skin a cat, so don't take this as the 'right' way of doing
it. It just happens to work for me!

Cheers

James

Sub Backup()

Dim Sl As PowerPoint.Slide
Dim BackUpSlide As PowerPoint.Slide
Dim x As Long
Dim y As Long
Dim myScale As Single
Dim sWidth As Long
Dim sHeight As Long
Dim subStr As String

'grab the proportions of the slide
sWidth = ActivePresentation.PageSetup.SlideWidth
sHeight = ActivePresentation.PageSetup.SlideHeight

'change this slide ref to your back-up slide ref - it currently
grabs the last slide
Set BackUpSlide =
ActivePresentation.Slides(ActivePresentation.Slides.Count)

For Each Sl In ActivePresentation.Slides
'only copy if not the backup slide
If Sl.SlideID <> BackUpSlide.SlideID Then
Sl.Copy
'this is needed for the hyperlink to work correctly (thanks
to David Marcovitz!)
subStr = Sl.SlideID & "," & Sl.SlideNumber & ","
'paste our shape
With BackUpSlide.Shapes.PasteSpecial(ppPasteJPG)
With .ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = subStr
End With
'move it around
.Left = x
.Top = y
'size it down so we can get 20 on the slide
.LockAspectRatio = msoTrue
.Width = sWidth / 5
x = x + .Width
'will the next one need wrapping?
If x + .Width > sWidth Then
x = 0
y = y + sHeight / 4
End If
End With
End If
Next
End Sub
 
R

Rob Risko

Thank you so much for the help...I really appreciate this.
To let you know how I am using this, I have an organization mission briefing. By controlling the Slide Set Up, I force the presenter to select or enter a unique briefer name, decide whether a Welcome slide is displayed (i.e. Welcome Visitor's) and finally choose a custom show from a 3rd slide that limits the show based no the knowledge level of the visitors. All of that is done with some macro in setting .hidden properties for the various slides or stepping into a certain custom show.
This piece of code will allow a button on the Master Slide (for use on any briefing slide) so that if the briefer needs to choose a backup slide to further explain a point, he can display a single slide with all available supporting slides and click on the one desired to show it, then advance back into the custom briefing where he left off.
I think there are many ways to do this but this is the most logical to me.
I'm also going to create a seperate briefing that will allow an adminstrator to add/delete slides in a guided process that will update the custom shows but I've not quite advanced to this part.
Your help is greatly appreciated!
Rob



James wrote:

Re: More Complex Request - Same Idea (VBA)
25-Sep-09

H

I've just played around with this a bit and come up with a different way
of identifying the slides/shapes which I think is neater. But there are
many ways to skin a cat, so don't take this as the 'right' way of doing
it. It just happens to work for me

Cheer

Jame

Sub Backup(

Dim Sl As PowerPoint.Slid
Dim BackUpSlide As PowerPoint.Slid
Dim x As Lon
Dim y As Lon
Dim myScale As Singl
Dim sWidth As Lon
Dim sHeight As Lon
Dim subStr As Strin

'grab the proportions of the slid
sWidth = ActivePresentation.PageSetup.SlideWidt
sHeight = ActivePresentation.PageSetup.SlideHeigh

'change this slide ref to your back-up slide ref - it currently
grabs the last slid
Set BackUpSlide =
ActivePresentation.Slides(ActivePresentation.Slides.Count

For Each Sl In ActivePresentation.Slide
'only copy if not the backup slid
If Sl.SlideID <> BackUpSlide.SlideID The
Sl.Cop
'this is needed for the hyperlink to work correctly (thanks
to David Marcovitz!
subStr = Sl.SlideID & "," & Sl.SlideNumber & ",
'paste our shap
With BackUpSlide.Shapes.PasteSpecial(ppPasteJPG
With .ActionSettings(ppMouseClick
.Action = ppActionHyperlin
.Hyperlink.SubAddress = subSt
End Wit
'move it aroun
.Left =
.Top =
'size it down so we can get 20 on the slid
.LockAspectRatio = msoTru
.Width = sWidth /
x = x + .Widt
'will the next one need wrapping
If x + .Width > sWidth The
x =
y = y + sHeight /
End I
End Wit
End I
Nex
End Su

Rob Risko wrote:

EggHeadCafe - Software Developer Portal of Choice
WPF DataGrid Custom Paging and Sorting
http://www.eggheadcafe.com/tutorial...f-32b2d802ae17/wpf-datagrid-custom-pagin.aspx
 
R

Rob Risko

David,
Thanks for the missing steps and hyperlink setup.
James,
Much better use by pasting a JPG instead of the pastespecial as a link. This takes up MUCH less space...21 backup slides as links = 12 MB file. As JPG = 5 MB file!!
Rob



Rob Risko wrote:

PERFECT!!
28-Sep-09

Thank you so much for the help...I really appreciate this.
To let you know how I am using this, I have an organization mission briefing. By controlling the Slide Set Up, I force the presenter to select or enter a unique briefer name, decide whether a Welcome slide is displayed (i.e. Welcome Visitor's) and finally choose a custom show from a 3rd slide that limits the show based no the knowledge level of the visitors. All of that is done with some macro in setting .hidden properties for the various slides or stepping into a certain custom show.
This piece of code will allow a button on the Master Slide (for use on any briefing slide) so that if the briefer needs to choose a backup slide to further explain a point, he can display a single slide with all available supporting slides and click on the one desired to show it, then advance back into the custom briefing where he left off.
I think there are many ways to do this but this is the most logical to me.
I'm also going to create a seperate briefing that will allow an adminstrator to add/delete slides in a guided process that will update the custom shows but I've not quite advanced to this part.
Your help is greatly appreciated!
Rob

EggHeadCafe - Software Developer Portal of Choice
WPF DataGrid Custom Paging and Sorting
http://www.eggheadcafe.com/tutorial...f-32b2d802ae17/wpf-datagrid-custom-pagin.aspx
 

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