Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    remove image an hyperlink in 1 go (xp - 2003)

    Hello all.
    I read the article that show how to remove hyperlinks in 1 go, and i need to remove also in the same time some picture that are in my the document.
    How can I do that in vba, or other method?
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: remove image an hyperlink in 1 go (xp - 2003)

    See if you can use this macro:

    Sub RemoveAllImages()
    Dim i As Long

    ' Remove inline pictures
    For i = ActiveDocument.InlineShapes.Count To 1 Step -1
    Select Case ActiveDocument.InlineShapes(i).Type
    Case wdInlineShapePicture, wdInlineShapeLinkedPicture
    ActiveDocument.InlineShapes(i).Delete
    End Select
    Next i

    ' Remove floating pictures
    For i = ActiveDocument.Shapes.Count To 1 Step -1
    Select Case ActiveDocument.Shapes(i).Type
    Case msoPicture, msoLinkedPicture
    ActiveDocument.Shapes(i).Delete
    End Select
    Next i
    End Sub

  3. #3
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: remove image an hyperlink in 1 go (xp - 2003)

    Thank's Hans, this macro work fine, but how can I insert a "tab" in the place of those images?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: remove image an hyperlink in 1 go (xp - 2003)

    That is a completely different question - it would have been better if you had mentioned this in your first post in this thread. Unfortunately, I don't have time to investigate this at the moment, hopefully someone else will reply.

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: remove image an hyperlink in 1 go (xp - 2003)

    If your graphics are "in line with text" then you can do this with an easy replace command.

    Edit > Replace
    Find What: ^g
    Replace with ^t
    Replace All

    If the graphics are floating then we will need to do a bit more work with Hans' macro. But I'm not sure where on earth we would put the TAB if we replace a floating graphic!

    StuartR

  6. #6
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: remove image an hyperlink in 1 go (xp - 2003)

    Thank's guys, both of you have give me a little help.
    Thank's.

    M.

Posting Permissions

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