none
While Inserting a word document containing a picture into another word document using 'Document.Range.InsertFile', the picture is not displayed. RRS feed

  • Question

  • While Inserting a word document containing a picture into another word document using 'Document.Range.InsertFile', 
    the picture is not displayed.

    In office 2010 it is getting the following error message .
    “The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link 

    points to the correct file and location”
    and in office 2007 just the cross mark is shown.
    The word document inserted is in combatabililty node

    Tried the same with VBA code inside word file(pressign alt F11 from the word doc).I got the same error here.
    Sub test()
    ThisDocument.Range.InsertFile ("c:\a.docx")
    End Sub

    can anybody comment on it.
    Friday, June 22, 2012 11:22 AM

Answers

All replies

  • Hi,

    Thanks for posting in the MSDN Forum.

    In accordance with your description, I reproduce your issue but there is no problem occurs. The  VBA code ThisDocument.Range.InsertFile() runs good, also the picture in the inserted document is displayed. Consequently, could you review your code if the FileName or FilePath is correct?

    Please feel free to let me know if you have further research on your issue.

    best regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, June 25, 2012 8:31 AM
    Moderator
  • Hi leo,

    The case here is the document to be inserted is created inside a dot net application and it is created in combatibility mode.If I convert it manually to the new format it is working fine.

    Regards,
    Naseem
    Tuesday, June 26, 2012 8:56 AM
  • Hi Naseem,

    There is a thread which I think would have the similar problem with you. I recommend it to you with the following link,and please refer to it for answers.

    http://social.technet.microsoft.com/Forums/en-US/word/thread/06bd0e81-d2b1-4d4c-80c1-15e446a58b0e

    best regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 27, 2012 3:08 AM
    Moderator