Merge with word

Mr Ashim

Registered User.
Local time
Today, 18:22
Joined
Mar 4, 2004
Messages
10
Is there an easy way to merge one record set from a table or better still the records shown on a form to Word. It seems that when merge is use the whole table is linked to the document being used.
 
Last edited:
Create a make table query and you can link the form to the query's critera using [FORMS]![formname]![formfield] to use the filed selected in the form to drive the query data selection (where statement). This will create a table with only one record which then can be merged into Word.

Does this help?
 
Alternative: Augment your table by adding a "selected" field (Yes/No). Make a query that uses the [Selected] field in a WHERE clause but not in the SELECT clause. (On the grid, clear the X in the box that shows you wanted to see that field in the resulting data grid.) Then build your MailMerge on the query, not the table itself.

This step requires less VBA code though it is clunky and not well-suited to sharing. Nevertheless it works fine when you use it.
 
Oh yeah, I forgot something, to automate this add a command button called "Mail Merge" to your form that calls a Macro. So for the Command Button properties event On Click event = DoCmd.RunMacro "macro name" (<just the name of the Macro in the " ")

Create a Macro with 2 Actions:
1. OpenQuery - calling the Make Table Query
2. RunApp - command line = WINWORD.exe
or WINWORD.exe "\\the path to the Word Doc" to open a specifc Word Doc
 
HAFPT said:
Create a make table query and you can link the form to the query's critera using [FORMS]![formname]![formfield] to use the filed selected in the form to drive the query data selection (where statement). This will create a table with only one record which then can be merged into Word.

Does this help?

Thanx i will get onto this and let you know ;)
 
The_Doc_Man said:
Alternative: Augment your table by adding a "selected" field (Yes/No). Make a query that uses the [Selected] field in a WHERE clause but not in the SELECT clause. (On the grid, clear the X in the box that shows you wanted to see that field in the resulting data grid.) Then build your MailMerge on the query, not the table itself.

This step requires less VBA code though it is clunky and not well-suited to sharing. Nevertheless it works fine when you use it.

Your all very nice people. Luverly Jubbly. I will give this lot a go and mail later. Thanks
 

Users who are viewing this thread

Back
Top Bottom