INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Powerpoint Update Links

Powerpoint Update Links

(OP)
Hello,

I am trying to write VBA code that allows a user to update links by selecting the file and updating.

This is what I have but some how the link range is changing causing the linked image to be cut in half.

Can someone PLEASE HELP!!

Dim In_file As Variant
Dim dlgOpen As FileDialog
Dim linkpos As Integer
Dim i As Integer
Dim k As Integer
Dim linkname As String

Set dlgOpen = Application.FileDialog(Type:=msoFileDialogOpen)
dlgOpen.AllowMultiSelect = False

For i = 1 To ActivePresentation.Slides.Count

With ActivePresentation.Slides(i)
For k = 1 To .Shapes.Count
With .Shapes(k)

If .Type = msoLinkedOLEObject Then
If dlgOpen.Show = -1 Then
In_file = dlgOpen.SelectedItems.Item(1)
End If

With .LinkFormat

linkpos = InStr(1, .SourceFullName, "!", _
vbTextCompare)

linkname = Right(.SourceFullName, Len(.SourceFullName) - linkpos)
.SourceFullName = In_file & linkname
.AutoUpdate = ppUpdateOptionAutomatic
End With
End If
End With
Next k
End With
Next i

ActivePresentation.UpdateLinks

End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close