• Reports or mail merge? (A2k)

    Author
    Topic
    #429443

    Looking for opinions. I need to create letters from info stored in my access database. I don’t want users to have to open the word documents and then go to the access database and input query parameters. I have a form from which a user will select a class number. Then they will click a button to create the letters for the entire class. I need to loop through the records, since different types of students require different letters. I’m just looking for general opinions, specifics will come later.

    Viewing 0 reply threads
    Author
    Replies
    • #1000162

      Both mail merge in Word and reports in Access should work. I don’t know how different the letters will be – if they share a common basis, you might be able to use one mail merge document / report, with conditional parts. If they are fundamentally different, you’ll need to use code to select the appropriate document or report for each student. Both options can be fully automated. You should choose mail merge if the letters may need to be edited manually, or need to be stored as documents.

      • #1000175

        Hans,
        Thanks for the additional considerations. How can I avoid getting the query prompt when calling the word document from access? whisper And how do I call the word doc from access? What additional considerations should I have since it’s a mail merge document?

        • #1000180

          You can use DDE to connect to the database; this will recognize form parameters in a query.

          I usually store the Word document without data source (ActiveDocument.MailMerge.MainDocumentType = wdNotAMergeDocument), and create it on the fly using Automation. See post 263,603 and post 375,939 for examples. This approach is very flexible, and has been working well in many databases for over 6 years now.

          • #1000182

            Ok, last question: would it be possible to embed the word documents in the database and call them from there?

            • #1000183

              No, that’s not a good idea. I’d store them separately; if you put them in the same folder as the database (or a subfolder of that folder, if you prefer), the database can always find them.

            • #1000185

              What’s the code to look in the folder the database is in?

            • #1000186

              You can use CurrentProject.Path to retrieve the path to the current database.

    Viewing 0 reply threads
    Reply To: Reports or mail merge? (A2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: