Share via

Break link on image in document doesnot work

Anonymous
2016-04-15T06:31:47+00:00

Hi all,

I have a few documents with images in them. They're all linked images. The source of these images are all missing.

When I open the document in Word 2013, I can see the images. When I open the document as a zip-file, I can see the correct images in the word\media folder.

When I select the image and press [F9] I see a square with a red cross in it (The linked image cannot be displayed.; as is to be expected since the source of the image is missing).

However, when I go to the backstage-view and click Edit Links to Files => Select the name (Source file) => click Break Link (check Save picture in document), the link won't break. The image is still a linked image, and updating the document causes the red cross to appear.

I've also tried a little VBA macro to see if that works, but no. It can see the linked image, but it's unable to break the link and embed the image.

Private Sub Document_Open()
Dim s As InlineShape
    For Each s In ActiveDocument.InlineShapes
        If s.Type = wdInlineShapeLinkedPicture Then
            s.LinkFormat.SavePictureWithDocument = True
            s.LinkFormat.BreakLink
        End If
    Next s
End Sub

I've tried with Word 2016 and Word 2010 as well, but they also fail to break the link to the images.

Word 2007 however IS able to break the link to the images.

Can anyone help me on this in order to make the unlinking of the images work in Word 2013?

Or explain to me how the unlinking does work with Word 2007 and not with other versions of Word?

Opening them all in Word 2007, unlinking them and saving them all is not really an option unfortunately...

Regards,

Bert

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-08-18T09:17:22+00:00

    *solved by workaroud*

    Breaking the links using Word 2010 didn't work.

    Tried the same in Word 2003 (I did happen to have an old installation somewhere) and that did the trick for me.

    Was this answer helpful?

    0 comments No comments
  2. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2016-04-15T10:30:37+00:00

    Your code works equally well for me in Word 2010 with:

    1. doc files created in Word 2003;
    2. docx files created as such; and
    3. docx files created by  conversion from Word 2003 doc files.

    I assume you're adding the code to the document template, since docx files cannot contain macros.

    Aside from the limitations mentioned in my previous post, the only other likely explanations are that your Office installations are faulty and/or the documents you're trying to process are corrupt.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-04-15T09:36:35+00:00

    When I create a new document, insert a linked image and run this code, it works fine with me as well.

    But using these existing documents all break-links on the images fail.

    I have to say the documents originally were binary *.doc-files (created with office 2003), and have been converted to *.docx-files (Word 2010 => save as newer version of this file-type).

    Was this answer helpful?

    0 comments No comments
  4. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2016-04-15T07:01:07+00:00

    Your code works fine for me with Word 2010.

    Do note that your code will only unlink inlineshapes that are in the document body. It will not unlink any shape objects or any inlineshapes in a header, footer, textbox, footnote, etc.

    Was this answer helpful?

    0 comments No comments