How to save a word content to an existing word file RRS feed

  • Question

  • Hi

    I have a word document opened programmatically and I need to save the content of the document to an existing document.

    I tried the document.SaveAs(...) method with the name of the existing word file, but it replaces the existing word file. but what I need is to copy the content and save it in my existing document.

    your help is appreciated.


    -Madura Shantha- Code as if the next guy to maintain your code is a homicidal maniac who knows where you live.
    Friday, December 17, 2010 7:07 AM


  • Hi Madura

    Open the existing document then use the Range.InsertFile method to bring in the content from the other document.

    Cindy Meister, VSTO/Word MVP
    • Marked as answer by madura shantha Thursday, December 23, 2010 4:52 AM
    Friday, December 17, 2010 9:04 AM