none
how to refresh or update a linked image RRS feed

  • Question

  • I have a linked image in a Word document (Word 2010). The source of the image is a URL. Right now, the linked image is only refreshed when the Word document is closed and re-opened. Is there a way to programmatically refresh the image without closing the document?
    Monday, January 23, 2012 7:43 PM

Answers

  • The command is Shape.LinkFormat.Update and looks like this in practice:

        Dim iShp As Word.InlineShape
        For Each iShp In ActiveDocument.InlineShapes
            iShp.LinkFormat.Update
        Next
    
    

     


    Kind Regards, Rich ... http://greatcirclelearning.com
    • Marked as answer by shane_m Monday, January 23, 2012 11:17 PM
    Monday, January 23, 2012 10:56 PM

All replies

  • The command is Shape.LinkFormat.Update and looks like this in practice:

        Dim iShp As Word.InlineShape
        For Each iShp In ActiveDocument.InlineShapes
            iShp.LinkFormat.Update
        Next
    
    

     


    Kind Regards, Rich ... http://greatcirclelearning.com
    • Marked as answer by shane_m Monday, January 23, 2012 11:17 PM
    Monday, January 23, 2012 10:56 PM
  • Thank you, Rich. That worked perfectly.

    In the meantime, I also discovered that I can select the image and hit F9 for a manual refresh.

    Monday, January 23, 2012 11:17 PM
  • A simpler way is:

    ActiveDocument.Fields.Update


    Cheers
    Paul Edstein
    [MS MVP - Word]
    Wednesday, January 25, 2012 4:37 AM
  • Thanks for answering, Paul. That worked as well.

    Shane

    Wednesday, January 25, 2012 2:30 PM