Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel VBA to powerpoint (Office xp, w2000)

    I have this code in excel...


    Sub ppt_drivers()
    Dim pptApp As Object
    Dim pptPres As Object
    Dim pptFile As String

    Set pptApp = New PowerPoint.Application
    pptApp.Visible = True
    Set pptPres = pptApp.Presentations.Open("c:test.ppt")

    pptPres.UpdateLinks

    'break links

    pptFile = InputBox("Filename ")

    With pptPres
    .SaveAs Filename:="c:" & pptFile
    .Close
    End With

    pptApp.Quit
    Set pptPres = Nothing

    End Sub

    From Excel I open a ppt file and update the links between Excel and ppt. The trouble is that i don't know the code to break the links after they are updated. Does anyone know the code to make that happen. thanks

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Excel VBA to powerpoint (Office xp, w2000)

    Tough one. PPT doesn't have a native method for this, and attempting to set the source to nothing doesn't work; trying to change the type to msoPicture doesn't work. (After the fact, I read <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q222/7/07.ASP>Q222707</A>.)

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel VBA to powerpoint (Office xp, w2000)

    ick!!! hmmm, ok. Is there a way I can make Excel have the focus, break the links manually, go back and resume saving and closing ppt in my code? thanks for the help

Posting Permissions

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