Posts by wendie1970

    Re: Macro to open Word and Start Mail Merge


    jtemp59: You may need to open a new post for this, so don't be surprised if you get dinged by the moderator.


    I am by no means an expert, so, for what it is worth:
    A) Make sure that you have set your reference to the Microsoft Word XX.XX Object Library (pick the highest number available)
    C) Set up the Word merge file, then just tell Excel to run the merge. Always works best for me.
    B) From what I can see, you are not declaring your word document correctly. The application handles the word "window", but it does not control what happens inside the document.


    Set up the application - then set up the document. But don't to use the application where you should be using the document property. Something like this:



    Hope that at least gives you some ideas to trouble shoot the problem. If not - open a post, and be clear what type of debug you are getting.

    Re: Macro to open Word and Start Mail Merge


    I know I am a little late to the game here, but for my fellow users, I wanted to Note for those still reading this post: Wedgetail is right:


    Code
    Set WdDoc = .documents.open Filename:="C:/30DAYLTR - Template1.doc"


    will generate an error. Should read like this:

    Code
    Set wdDoc = .Documents.Open(Filename:="C:/30DAYLTR - Template1.doc")


    with that minor change, code works fine. And after using it, this is by far the simplest code I have created in months!


    Happy coding!