Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint Update Links No Excel Error Messages

Status
Not open for further replies.

jlf81

Technical User
Dec 16, 2008
16
0
0
GB
I am trying to wrtie a Macro to update all the links in a PowerPoint (2003) file to excle sheets where there are various messages regarding updating links which need to have 'continue' or 'Ok' clicked on due to issues regarding the source files not being on drives I have access to. I need to keep the links in the Excel files, but can't work out how to get rid of the message boxes and wondered if any one could help. So far I have: -

Sub linkupdate()

Dim ExcelApp As Excel.Application
Dim osld As Slide
Dim oshp As Shape

Dim appExcel As Excel.Application
On Error Resume Next
Set appExcel = GetObject(, "Excel.Application")
If appExcel Is Nothing Then 'No instance of Excel is available
Set appExcel = CreateObject("Excel.Application")
End If
ExcelApp.DisplayAlerts = False
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoLinkedOLEObject Then oshp.LinkFormat.Update
Next oshp
Next osld

ExcelApp.DisplayAlerts = True

End Sub

Any help would be greatly aprreciated the update bit seems to work but the alerts dont seem to have turned off

Thanks
 
Anyway, why not simply use this ?
Code:
Sub linkupdate()
ActivePresentation.UpdateLinks
End Sub

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I could replace the powerpoint bit with that (and yours is a better way than I was doing it, and I will change it to that), but it's the excel asking for me to click 'continue' and 'ok' that I am having problems as I want to be able to just leave it run with no intervention from me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top