none
how can i save the picture(with online url) in word

    Question

  • i open a document and insert a htmlfile which have some image tags, the code is below:

    Word.Paragraph p = doc.Paragraphs.Add();
    p.Range.InsertFile(htmlfile);

    then i save the document in word. 

    but when i reopen the document i found the image is always download from web other than embbed in word.

    i want to embbed the image in .docx file(in \word\media\), how can i do it?

    i try save as.., but problem no solved. i need help,,thanks.

    Thursday, December 26, 2013 10:01 AM

Answers

All replies

  • Hello sendreams,

    Please take a look at the How to embed linked images in Word 2007 article which explains the required steps. Note, you can run a macro recorder and see the calls made in the background. I suppose the BreakLink method is used.

    Also please take a look at the similar forum thread.


    • Edited by Eugene Astafiev Thursday, December 26, 2013 12:01 PM a link to a forum thread is added
    • Marked as answer by sendreams Sunday, December 29, 2013 11:03 AM
    Thursday, December 26, 2013 12:00 PM
  • hi, Eugene Astafiev

    thank you so much

    i have know how to do it by word ui now, and follow your propose i want to record a macro to see the vba code, but it is strange when i see the macro, it is nothing just a name:

    Sub embbed()
    '
    ' embbed 宏
    '
    '
    End Sub

    i use word2013.

    could you possible help me record a macro?

    Thursday, December 26, 2013 12:20 PM
  • Please take a look at the Record or run a macro article for more information about this.
    Thursday, December 26, 2013 12:24 PM
  • hi, Eugene

    perhaps i don't said the problem clearly,

    i know how to record the macro, but unfortunately, when i record in the Backstage view, record nothing.

    this is real question for me.

    thanks

    Thursday, December 26, 2013 1:51 PM
  • If you right click on the image and choose Remove hyperlink, it seems to work in the same way.

    There is no need to use backstage controls.

    Thursday, December 26, 2013 2:50 PM
  • o, i know, tks for your patience.
    Friday, December 27, 2013 12:24 AM
  • Hi sendreams,

    Could you please confirm that you were able to record a macro? If so, may I ask you to publish the code for other forum readers?

    Friday, December 27, 2013 7:57 AM
  • hi, Eugene

    i right click the picture and does't found "Remove hyperlink" command, i think this work only can be done in backstage view.

    this link talk about the way in word2010 or 2013:
    http://wordribbon.tips.net/T006010_Breaking_a_Document_Link.html

    finally,i can't record the macro. if publish to rather suitable forum will be ok. tks.


    Friday, December 27, 2013 9:00 AM
  • Hi sendreams,

    Did you have a chance to call the BreakLink method of the LinkFormat class against the linked image, as I wrote in my first reply above?

    Friday, December 27, 2013 9:09 AM
  • hi, Eugene

    BreakLink can work, thank you very much.

    Sunday, December 29, 2013 11:04 AM