VBA to open mail merge based on results in a filtered form (1 Viewer)

mounty76

Registered User.
Local time
Today, 09:29
Joined
Sep 14, 2017
Messages
177
Hello!!

I have a query which is displayed in a form, next to each result is a button that opens another form which is filtered to that specific record.

I'd like to make a button with VBA code so that it opens up a mail merge document with only that filtered data in.....any help much appreciated! Currently it is showing all the records in the query it is attached to. I was thinking it would be best to append the filtered data into a 'temp query' in which the mail merge can use....if anyone knows the best way forward that would be great.
 

conception_native_0123

Well-known member
Local time
Today, 11:29
Joined
Mar 13, 2021
Messages
1,252
maybe the attached file can help you get started...
 

Attachments

  • Run Mail Merge from VBA.zip
    25.8 KB · Views: 22

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
14,176
you can create a Report.
then Open the Report on "filtered" list.
 

mounty76

Registered User.
Local time
Today, 09:29
Joined
Sep 14, 2017
Messages
177
Thanks for this, is there a way to import a word document into an access report
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:29
Joined
May 7, 2009
Messages
14,176
you can make an image from your word doc.
make the image as background image of the
report.
 

Users who are viewing this thread

Top Bottom