PDA

View Full Version : VBA to update links in presentation



schneidm
01-17-2010, 08:46 AM
I would like the following code to open my powerpoint file and update the multiple (Excel chart) links in the file. It opens, but the UpdateLinks command does not work. Help?

Private Sub Command165_Click()
Dim ppt As Object

Set ppt = CreateObject("PowerPoint.Application")
With ppt
.Visible = True
.Presentations.Open "MyFilePath.ppt"
.ActivePresentation.UpdateLinks
End With
Set ppt = Nothing

End Sub

John Wilson
01-18-2010, 01:52 AM
Are you using version 2007?

schneidm
01-18-2010, 05:09 AM
I am using 2003. I discovered the code does work provided I have the link refresh properties set to "Automatic" and not "Manual". However, this setting prompts the "Refresh Links" dialog box whenever someone opens the ppt file.

Can I use code to refresh the links if the properties are set to "Manual"?