C# mail merge RRS feed

  • Question

  • User-1471881183 posted
    hi , im referring http://support.microsoft.com/?kbid=301659 this article to do mail merge by program. actually this works fine only but i have a question it opens a word document file, instead i want to save this on hard drive and dont open it, how to do this? experts please help me...
    Wednesday, December 21, 2011 12:27 PM


All replies

  • User1080017370 posted

    Hi winseealn,

    I'm really no expert in this matter and I'm not sure I correctly understand your question. Would you like to achieve this without starting the word process or without making word visible to the user? If it is the latter, based on only the sample code and without trying if it works, have you tried removing the line "wrdApp.Visible = true;" from the code?


    Wednesday, December 21, 2011 6:03 PM
  • User-1471881183 posted

    robert thanks for oyur response.

    i  tried this wrdApp.Visible = true now its not showing the word document but this time i dont know where its saved, i want to save it within my root directory, please help me

    Thursday, December 22, 2011 11:22 AM
  • User-1471881183 posted

    anybody is there?

    Thursday, December 22, 2011 12:39 PM
  • User1080017370 posted

    Hi again,

    I'd think that using the SaveAs method on the Document object would solve your problem: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word._document.saveas.aspx



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 23, 2011 7:54 PM