2007: VBA Refresh Links

  • Thread starter Thread starter thomas müller
  • Start date Start date
T

thomas müller

Hello,

I have a PPT presentation with several Charts linked with excel. Im
refreshing the Links mauall now.

I Tried this code to refrseh them automatically, but i got an error
message (Next oshp: "Next without for":

Sub linkupdate()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoLinkedOLEObject Then
oshp.LinkFormat.Update
Next oshp
Next osld
End Sub

Can anyone help me or provide a working solution? Im using PPT 2007

Thanks in advance

Thomas
 
Sub linkupdate()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoLinkedOLEObject Then
oshp.LinkFormat.Update
End If
Next oshp
Next osld
End Sub


Regards,
Shyam Pillai

Image Importer Wizard: http://skp.mvps.org/iiw.htm
 
Hello Shyam,

thanks a lot.

Thomas


Shyam said:
Sub linkupdate()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoLinkedOLEObject Then
oshp.LinkFormat.Update
End If
Next oshp
Next osld
End Sub


Regards,
Shyam Pillai

Image Importer Wizard: http://skp.mvps.org/iiw.htm
 
Back
Top