Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Change SQL or Sort?
I have a mailmerge document in Word 2003. The datasource for it is an excel
spreadsheet. When I open the document, it displays an SQL query in a message box. Right now, the mailmerge document only displays certain data. (One of the spreadsheet columns is Block, and in the query there is a statement, "WHERE 'Block' = 'C'", so only the rows with "C" in Block are being inserted into the mailmerge doc.) Is there a way to access the SQL query command and change that? Alternatively, the data could simply be sorted by Block - which might actually be better. Thanks. Bert |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Change SQL or Sort?
1. Enable the mailmerge toolbar (View-Toolbars)
2. Click the 3rd icon (mail merge recipients) 3. Either a. select the drop-down arrow to the left of "block" in the column header, and select All or b. click the drop-down arrow to the left of any of the column headers, click Advanced... and you should see any existing query filters/sort options. (If you want to save the change, save the document) Alternatively, you can fix the SQL directly but only in VBA. Peter Jamieson http://tips.pjmsn.me.uk Bert wrote: I have a mailmerge document in Word 2003. The datasource for it is an excel spreadsheet. When I open the document, it displays an SQL query in a message box. Right now, the mailmerge document only displays certain data. (One of the spreadsheet columns is Block, and in the query there is a statement, "WHERE 'Block' = 'C'", so only the rows with "C" in Block are being inserted into the mailmerge doc.) Is there a way to access the SQL query command and change that? Alternatively, the data could simply be sorted by Block - which might actually be better. Thanks. Bert |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Change SQL or Sort?
Thanks, Peter! Just what I needed!
Bert "Peter Jamieson" wrote in message ... 1. Enable the mailmerge toolbar (View-Toolbars) 2. Click the 3rd icon (mail merge recipients) 3. Either a. select the drop-down arrow to the left of "block" in the column header, and select All or b. click the drop-down arrow to the left of any of the column headers, click Advanced... and you should see any existing query filters/sort options. (If you want to save the change, save the document) Alternatively, you can fix the SQL directly but only in VBA. Peter Jamieson http://tips.pjmsn.me.uk Bert wrote: I have a mailmerge document in Word 2003. The datasource for it is an excel spreadsheet. When I open the document, it displays an SQL query in a message box. Right now, the mailmerge document only displays certain data. (One of the spreadsheet columns is Block, and in the query there is a statement, "WHERE 'Block' = 'C'", so only the rows with "C" in Block are being inserted into the mailmerge doc.) Is there a way to access the SQL query command and change that? Alternatively, the data could simply be sorted by Block - which might actually be better. Thanks. Bert |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sort from the right | New Users | |||
How do I change Default options in Sort Text window? | Microsoft Word Help | |||
Word 2000 Sort/alpha cannot sort in Finnish | Microsoft Word Help | |||
Word datasource sort doesn't sort all records in mail merge | Mailmerge | |||
Table Sort - Sort only 3 of 4 columns | Microsoft Word Help |