Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail Merge Questions & Problems (Word 97)

    Our company switch from WordPerfect to Word so consider me a new user <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>. I was able to create a merge document and are having some problems and questions. I have attached the form used in the procedure. I was alo going to attach the 2 data sources but it didn't let me, LOL. Here are my questions/problems.


    1. How come the information (City) coming from Table2.doc (using Database command) is not being centered just like the rest of the document afte the merge.


    2. Why do I have to do Edit, Select All, press F9 before I print? Otherwise, the images are not printed. Is there a way around this? I have checked Tools, Options, Print, Update Fields and it didn't do anything. It is such a drag having to remember to this everytime.


    3. Why does it give me an error message after merge? "Word could not insert the result because your query generated an empty result." If I have 4 records, it works just fine. If I remove the database command, it works ok but leaves our Company name. All I want is 4 records per page. I was going to use Labels but was not able to use the Database command to pull from another table. So I used a Catalog and defined 2 columns.


    4. Using the Database Query in this type of merge, how does Word format it in the document after the merge? Is it in a table and not normal text?



    Please help, I am really desperate.

    --Maria
    Attached Files Attached Files

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Location
    Iowa, USA
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Maria,

    Without the data documents I'm going to punt on some of this...

    1 - The city information is not centered because the paragraph attribute for that line (paragraph) in your form docuent is set to be left aligned. If you don't have your Formatting toolbar visible, right-click in the toolbar area and select Formatting. That will give you some icons to see/set the paragraph alignment. Click on the city line, then click the center alignment button and (for each of the 4 you have in your sample) your cities will be centered.

    2 - I didn't see any images in your form file, so I assume they are coming from the data source. I've never inserted images from a data source so I don't know if there is an update quirk but what you did with the Update Fields setting SHOULD have solved that problem. If the images are all the same, I'd recommend putting them in the form and not pulling them from the data source. If they are all different depending on the record, that obviously won't work...

    3 - I don't know about this... I'd have to see the data source(s) and do some digging.

    4 - It will be formatted however you have your form document set up.

    Sue

  3. #3
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Sue, thanks for the reply.

    1. The entire form file is centered. After the merge, the City field becomes left justified while the rest is still centered.


    2. The images are coming from the data source. I am attaching in this thread. They are different images, depending on person's last name.


    4. For days of testing, I am pretty sure that after the merge, it was brought in inside a Table. That is why I did not use the Label feature. Today, it brought in as regular text. I'm not sure what I did different, LOL.
    Attached Files Attached Files

  4. #4
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Sue, attached is the second table where I query for the City.

    Thanks,
    Maria
    Attached Files Attached Files

  5. #5
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Maria,

    1. How come the information (City) coming from Table2.doc (using Database command) is not being centered just like the rest of the document afte the merge.

    This is one of the drawbacks to using the Database field, it is difficult to format. Best to apply the Center Paragraph alignment to your style.

    2. Why do I have to do Edit, Select All, press F9 before I print? Otherwise, the images are not printed. Is there a way around this? I have checked Tools, Options, Print, Update Fields and it didn't do anything. It is such a drag having to remember to this everytime.

    Unfortunately this is the only method that works when using the IncludePicture field.

    3. Why does it give me an error message after merge? "Word could not insert the result because your query generated an empty result." If I have 4 records, it works just fine. If I remove the database command, it works ok but leaves our Company name. All I want is 4 records per page. I was going to use Labels but was not able to use the Database command to pull from another table. So I used a Catalog and defined 2 columns.

    [tab[ Check Table2.doc and make sure each LastName is accounted for. You should get an additional message for the record # that generated the error.

    4. Using the Database Query in this type of merge, how does Word format it in the document after the merge? Is it in a table and not normal text?

    This really depends on the datasource you are using. For example, if you are using an Access database then the database field results are placed in a Word table.

    What I don't understand is why you need to use the Database field. Typically this is used when you need a One-to-Many type of merge. Based on the syntax of your Database field, it appears you are returning one record and one field for each record you have in the data source attached to the Main form.

    Not that i really matters, but could you include all of the fields in one data source and use only the IncludePicture field?
    ~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  6. #6
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Well, If I don't use 2 data sources, the user must input the City all the time. I have modified these documents, the original one have hundreds of records. So inputting the City field is not acceptable <img src=/S/nope.gif border=0 alt=nope width=15 height=15>.

    What do you suggest I do to better automate this?

    <<[tab[ Check Table2.doc and make sure each LastName is accounted for. You should get an additional message for the record # that generated the error.>>

    If I have 3 records, it gives me this error on the 4th record. I don't have 4 records, just 3. It's just the form is formatted to fit 4 records per page.


    Thanks
    --Maria

  7. #7
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Maria,

    I understand why you need the two data sources now. Like I said, it's not a big deal but I was just curious as to why. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    For your blank record(s), instead of using {Next} use {NextIF}. Note that your mail merge data is placed as the false argument in the NextIf field.

    For example:
    { NEXTIF { MERGEFIELD LastName }<> "" { MERGEFIELD LastName }
    { MERGEFIELD FirstName }{ DATABASE d "C:TempTable2.doc" s "SELECT City FROM C:TempTable2.doc WHERE ((LastName = '{ MERGEFIELD LastName}'))" * Charformat }{ INCLUDEPICTURE "C:temp{ MERGEFIELD Picture }" d * MERGEFORMAT} }
    ~~~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  8. #8
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Hey there! Maybe I'm doing something wrong. My data source had 3 records. When I used NEXTIF, it only merged the first and last records. Skipped record #2.

    Ahhh, this is giving me a headache <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    BTW, I really appreciate your help. Too bad I don't know your first name.

    --Maria

  9. #9
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Maria,

    I tried modifying the SQL statement so that the nulls are not included but still get the error message along with a few other things.

    Then I decided that the nature of a catalog is to create 1 record and have it duplicate as needed. I think the problem you may have been running into is the correct placement of each record on a page. I placed the IncludePicture field into a borderless Word table, set it to an exact measurement, and left the two column layout.

    See attached for an example.

    <<Too bad I don't know your first name.>>
    Ah! But if I gave you a name - how do you know I am who I profess to be? <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    ~~~~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  10. #10
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Ohhhh <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21> thank you very much. You have no idea. I have been pulling my hair out for days trying to fit 4 records in a page. This was so easy to do in WordPerfect <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>.

    Maybe I should give up on trying to find out how to extract the City field from the second table w/o the placing the end result in a table. It also makes me cry thinking that I just have to select all, select center justified and do an F9, every time <img src=/S/weep.gif border=0 alt=weep width=21 height=16> before I print.

    --Maria

  11. #11
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    <hr>2. Why do I have to do Edit, Select All, press F9 before I print? Otherwise, the images are not printed. Is there a way around this? I have checked Tools, Options, Print, Update Fields and it didn't do anything. It is such a drag having to remember to this everytime.

    Unfortunately this is the only method that works when using the IncludePicture field. <hr>
    Really? Even if you have Update fields ticked on the Print options tab? Sounds like a bug!

  12. #12
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Maria,

    I took care of centering in the example. Go to Format/Style and Modify the Normal style. Under the Format button, click Paragraph and modify the alignment there. (Note if you choose to use the document I posted, you'll need to press <Alt F9> to toggle the field codes and change the IncludePicture path)

    As for the rest, that's what a macro is for! <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Now is a prime time to start learning how easy it is to customize Word to do whatever you want it to. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    The macro you need can be easily recorded. Just turn on the macro recorder:
    * Merge to a new document,
    * Press <Ctrl A> (Select All)
    * Press <F9> (Update fields)
    * Press <Ctrl Home>
    * Stop the recording

    Then when you need to merge, just run the macro.

    Here are a few articles to get you started:

    <A target="_blank" HREF=http://www.mvps.org/word/FAQs/MacrosVBA/UsingRecorder.htm> Creating a macro with no programming experience using the recorder</A>
    <A target="_blank" HREF=http://www.mvps.org/word/FAQs/MacrosVBA/AssignMacroToToolbar.htm> How to assign a Word command or macro to a toolbar or menu</A>

    And for your transition from WP to Word: <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    <A target="_blank" HREF=http://www.mvps.org/word/FAQs/General/RevealCodes.htm>Is there life after

  13. #13
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    <<Unfortunately this is the only method that works when using the IncludePicture field. >>

    Well....perhaps I shouldn't have been so matter-of-fact on this. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    I should have stated that it is the method that is guaranteed to work 100% of the time! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I think relying on Print to update fields it buggy in general. I've ran into too many situations where the previous time I printed the fields updated correctly, but then the next time they didn't.

    Since Maria indicated this wasn't working for her either, she may be experiancing what I have in the past.
    ~~~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  14. #14
    2 Star Lounger
    Join Date
    Aug 2001
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Bam:

    Thank you for all your help. Now I only 1 more problem left <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>.

    The end result of the merge, where I use DATABASE, does it have to be in a Table? I changed the Normal style to Center but the Table is coming out left justified. I checked the switches of DATABASE and I do not see anything I can use so that the Table will be centered horizontally after the merge. Do I really have to go through all the Table and change the justification manually?

    Thanks again,

    --Maria

  15. #15
    BAM
    Guest

    Re: Mail Merge Questions & Problems (Word 97)

    Hi Maria,

    <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15> In Word 97 I only get a table if I use an Excel Worksheet or Access Database. If it is a Word table then the result of the Database field is inserted as text.

    What are you actually using as your data source?

Page 1 of 2 12 LastLast

Posting Permissions

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