Consulting

Results 1 to 3 of 3

Thread: Disable Update Link Prompts

  1. #1
    VBAX Mentor asingh's Avatar
    Joined
    Jul 2005
    Posts
    307
    Location

    Disable Update Link Prompts

    Hi All,
    I needed help for the following...
    I have a PPT that retrieves values from an excell Sheet. When I open the PPT i get a prompt "to update the links". I want this prompt to be disabled..but the links should get updated respectively.

    thanks a lot
    Asingh

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Hi there,

    This is possible, but if I understand things correctly, not very straight forward.

    You can stop your linked chart objects from triggering the message by running the following code to change its "LinkFormat.AutoUpdate" property (which determines its behaviour when the presentation is opened)[VBA]For Each sld In ActivePresentation.Slides
    For Each sh In sld.Shapes
    If sh.Type = msoLinkedOLEObject Then
    If Left(sh.OLEFormat.ProgID, 11) = "Excel.Sheet" Then
    sh.LinkFormat.AutoUpdate = ppUpdateOptionManual
    End If
    End If
    Next
    Next[/VBA] Then save the presentation. You will not get the message but your objects won't update.
    You can run some code to update them[VBA]For Each sld In ActivePresentation.Slides
    For Each sh In sld.Shapes
    If sh.Type = msoLinkedOLEObject Then
    If Left(sh.OLEFormat.ProgID, 11) = "Excel.Sheet" Then
    sh.LinkFormat.Update
    End If
    End If
    Next
    Next[/VBA] but to do this automatically when your presentation opens is not ordinarily possible because there are no presentation events (like "presentation_open") available.

    A procedure in a standard module named "Auto_Open" will run but only in a file saved as an addin. That procedure will run when the addin loads.

    The only way I can think of to trigger this for an individual pres is to use an addin that enables application events in powerpoint (KB article here) and use the application's Presentation_Open event to check for the pres ny name and then run the update code.

    I told you it wasn't straight forward.

    or maybe I'm missing something obvious
    K :-)

  3. #3
    VBAX Mentor asingh's Avatar
    Joined
    Jul 2005
    Posts
    307
    Location
    Thanks a lot Killlian,
    By using the add-in u suggested and the code you provided..I was able to see "events" in my PPT's. Its working fine now...


    regards

    asingh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •