Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word Automation (2002)

    I have been playing around with Word automation from Access and have so far been able to popluate bookmarks, add a picture and populate a word table.

    Ultimately my intent is to have Access complete a Word template with repetitive data fields. I want to use the template to save myself a lot of reformatting if I go and create the document from scratch or a lot of code if I create the document formatted from Access.

    Now I am at the point where I need to decide to stop playing around and apply the three different codes to create the documents or that I need to mail merge the document to save me assembly time later, and I cannot decide as I do not know.

    So the document is set up as a template it contains headers that define areas to be completed the headers are:

    Functional Description
    Control
    Associated Valves
    Associated Equipment
    Maintenance Tasks

    These headings are followed by a table that contains distilled manufacturers data for the item in question. The table length is unknown and varies from three cells to 30 or more depending on the item.

    From the code I have it appears that if I were to mailmerge I would set up fields in the template and then populate these with the first set of data and then manipulate the table which is from a different data source.

    I have been looking at Microsofts site and MSDN and cannot see how this code would look if I adopt this approach.

    So I have two questions:

    -Is mail merge the best choice for the above?
    - Does anyone have a code snippet showing populating the exiisting predefined mailmerge fields in word, and how do you repeat for each document created?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Word Automation (2002)

    I don't really understand your description. What is "the first set of data" and what is "a different data source"?

  3. #3
    New Lounger
    Join Date
    Jan 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Automation (2002)

    Sorry This is hard as I know what I mean.

    The first part of the document is based on a recordset the word table is based on a different recordset. The data must be driven from code. I tried making the template the other way based on a query and I end up with repetitive data and line by line tables.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Word Automation (2002)

    A mail merge can use only one data source, so I don't think mail merge is the way to go for you. Using code to replace bookmarks or placeholder text is probably the best solution, but if you want more specific help, you'll have to provide a clearer description.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •