2007: VBA Refresh Links

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
 
S

Shyam Pillai

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
 
T

thomas müller

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
 

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