• Code to Break Links (Office xp, w2000)

    Author
    Topic
    #359964

    Is there vba or vb code that will break all the links in a ppt file? thanks

    Viewing 1 reply thread
    Author
    Replies
    • #540870

      You should be able to Cut, then Edit-Paste special as a picture and remove the link. If you know VBA at all, record this step, and then make it loop until… I don’t know VBA enough to create that code for ya.

    • #540888

      If you’re looking to remove the links, leaving just the text to which they were attached, here is a VBA procedure that will do that. I added this code by opening a presentation, popping up the VB Editor (Alt-F11), then choosing Insert Module.

      Sub RemoveLinks()
      If MsgBox("Remove hyperlinks from the active presentation?", vbQuestion + vbYesNo) _
           vbYes Then Exit Sub
      Dim hypLink As Hyperlink, sldIndivSlide As Slide
      With ActivePresentation
          If .HasTitleMaster Then
              If .TitleMaster.Hyperlinks.Count > 0 Then
                  For Each hypLink In .TitleMaster.Hyperlinks
                      hypLink.Delete
                  Next
              End If
          End If
          If .SlideMaster.Hyperlinks.Count > 0 Then
              For Each hypLink In .SlideMaster.Hyperlinks
                  hypLink.Delete
              Next
          End If
          For Each sldIndivSlide In .Slides
              If sldIndivSlide.Hyperlinks.Count > 0 Then
                  For Each hypLink In sldIndivSlide.Hyperlinks
                      hypLink.Delete
                  Next
              End If
          Next
      End With
      End Sub
      • #541016

        Thank you so much. I can use this code for hyperlinks for sure. I wasn’t clear, however, that the links i need to break are links from Excel to Powerpoint. The only way i can find to change them is to go into links and one by one break the links. When i try to record a macro it won’t give me any code. Hope this clarifies things. thanks again.

    Viewing 1 reply thread
    Reply To: Code to Break Links (Office xp, w2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: