![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
What does err.number 5631 mean? Where did you source that code?
I don't have time to work on the nuances of your code so just bring the following line up onto that same line so it says If Err.Number = 5631 Then Err.Clear That should allow the code to remove that particular error
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#2
|
|||
|
|||
|
I found that part of code when I searched 'runtime error 5631' and found it in another forum somewhere.
This is the error here: Run time error 5631 Word could not merge the main document with the main data source because the data records were empty or no data records matched your query options. I adjusted as you advised so the line reads If Err.Number = 5631 Then Err.Clear I have re-run the mailmerge macro but this has not fixed the above runtime error popping up. My macro works fine if there is more than one record, my problem is only if there is just one record it breaks/errors. For example: If we have a list of 12 records for the day but the word doc I am wanting to save refers to only 1 or 3 entries, if we go into edit recipient list and only tick the ones we need we get that run time error. If I add a filter to the full list so it only shows the entries we need rather than unticking them it will work BUT only if there are more than 1 entry. In the meantime I have advised my colleagues if there is one entry just save as a pdf manually. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
supress mail merge error document
|
vincenzo345 | Mail Merge | 2 | 10-10-2017 12:03 PM |
Mail Merge Next Record If rule
|
RHensley | Mail Merge | 10 | 03-07-2017 08:05 AM |
| avoid duplicete record and merge the record with the existed record | hemant.behere | Excel | 0 | 01-10-2012 02:53 AM |
| compile error in Word | raco | Word | 0 | 09-28-2010 12:40 PM |
| Extraneous record in Word Mail Merge | aldo13 | Mail Merge | 0 | 01-23-2006 01:58 PM |