Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Oct 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Word 2010 Merge from excel into Table Directory

    I have been struggling with this for the last two months. :confused::o:

    I have an excel 2010 file that contains a database of our programs service providers. The file has 13 tabs (spreadsheets), one for each type of provider. I also downloaded and installed a macro to create a master sheet. Each sheet has the same column headings (COUNTY, FIRST, LAST, FULLNAME, PGM_TITLE, ORG'N_TITLE,ORGANIZATION, ORGANIZATION_2, STREET_ADDRESS, STREET_PLUS, CITY, ST, ZIP, PHONE, EXT, ALT_PHONE, FAX, FAX2, EMAIL, 4EM, OTHEREMAIL, NOTES, AGENCY_KEY, PGM, HV_SPECIALIST, EI_SPECIALIST, UNHS_SPECIALIST). Note: Specialists (HV, EI, UNHS) are housed here. Each month updated contact information is published and emailed that includes county contacts and assigned program' specialist for each county. So that you can look flip to the Franklin County page and see all the contacts for Franklin County and who the contacts in Franklin County contact in this department. (Ohio has 88 counties) Some counties have more than one program contact (For instance Franklin, Cuyahoga, and Hamilton are where Columbus, Cleveland, and Cincinatti are and due to the size of the city there are multiple places that provide services.

    The data file (Workbook) is large because it is not used just for this merge document. I established one single database for the all the programs, services, partners, etc so that there is only one place to maintain, retrieve, locate, etc. for everyone seeking information.There is field in the excel data that contains only a “ ; “ and that is so anyone can copy a the column of emails (including the “ ; “) and paste it into an email without worry. (our IT isn't great at maintaining or establishing outlook distribution lists.

    I want to end up with a word document (Table) that has county contact information for each program provider within my department and in the counties. Unfortunately, communications is not my sole responsibility so I am trying to establish something that is quick and easy .

    Regarding the MERGE DOCUMENT:

    Something is wrong. I have tried several times using several field codes and uses of the the "if-then-else" (I think I have that part down). I have problems with the change in county (new category or key) and forcing the new county to a new page AND NEW TABLE.

    I've attached the latest form (Word Doc) and a sample data excel file. The excel file is not the entire database but a sample of the records needed for the merge.

    I found information to queue to a new page when the category or key field changes (in my case the mergefield is county)
    In addition to the information I found from Greg Maxie that I tried to adapt to the attached document. I tried adapting the code below inserting control enter (manual page break in the fields) but I am still stuck.

    { IF { MERGESEQ } = "1" "{ MERGEFIELD COUNTY }¶
    " "" }{ SET Place1 { MERGEFIELD COUNTY }}¶
    { If { Place2 } <> { Place1 }" INSERT NEW PAGE

    NEW PAGE

    :confused:
    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,947
    Thanks
    0
    Thanked 204 Times in 185 Posts
    Hi Danelle,

    I suggest you have a close read of my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
    http://windowssecrets.com/forums/sho...merge-Tutorial
    (it's a 'Sticky' thread at the top of this forum)

    The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

    For some worked examples, see the attachments to the posts at:
    http://www.msofficeforums.com/mail-m...html#post23345
    http://www.msofficeforums.com/mail-m...html#post30327
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Oct 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I thought I had done so, I took another shot at it but I'm still having issues.
    When I go through the Merge, the County doesn't change with each record and I also thought the table would continue to populate and add cells to the row so long as there were rows with the same key field (county).

    Can you look at my code to see where and how I am going wrong?

    Thank you.
    Attached Files Attached Files

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,947
    Thanks
    0
    Thanked 204 Times in 185 Posts
    See attached. It took a fair bit of re-working to get it into a format that will approximate the output you apparently require. Note the use of Section breaks and a multi-column layout to generate what appears to be four columns below your heading rows. At a more fundamental level, your field coding was entirely within the table, whereas the table (now broken into two segments) needs to be within the field coding. Note too that, whereas your table apparently envisaged an across-then-down arrangement, the output now runs down-then-across. That's a by-product of this method.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    New Lounger
    Join Date
    Oct 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Macropod, thanks for responding and for the work. I see that I needed to include the table in my 'field work'. Unfortunately, it didn't work the way I wanted. I am uploading, what I did by hand for one county (which is taking forever to manually in excel); but you will be able to see what the finished product I am hoping for.

    I hope this makes sense. Again, I do appreciate your input and help.
    Attached Files Attached Files

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,947
    Thanks
    0
    Thanked 204 Times in 185 Posts
    Quote Originally Posted by danelle View Post
    Unfortunately, it didn't work the way I wanted.
    Aside from your Excel workbook having 5 columns per county and the Word document having only four (per the example you provided), I'm not sure what the particular difference is that you're concerned with. Perhaps you could elaborate.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #7
    New Lounger
    Join Date
    Oct 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Paul:
    I am attaching jpgs of screen prints from Word of the file I downloaded that you have helped me on. This is why I don't believe it to be working.
    Attached Images Attached Images

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,947
    Thanks
    0
    Thanked 204 Times in 185 Posts
    You apparently haven't executed the merge... you're only previewing it!

    To do that, click on Finish & Merge > Edit Individual Documents.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Tags for this Thread

Posting Permissions

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