Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Filter By Form Output To MailMerge

Status
Not open for further replies.

doctorswamp

Technical User
Jul 15, 2003
133
GB
I'd like to use filter by form to extract various selections of contact data (just company addresses, eg by postcode), then click a button to mailmerge the data using a pre-designed Word template.

I'd preferably like to do this directly, for whatever filter criteria I select and without using the Office Links process.

Have had some excellent pointers on 'native mailmerge' in the past, so thanks to folks like Remou and Pseale for that but they didn't quite do what I now want.

Sorry if this is well trodden ground.
 
Dr. Swamp,

I am not sure I understand what you are asking? What is the question?

?

C-D2
 
Hmmm... Not exactly sure how to proceed, but for starters I think I would shy away from using filter by form since filters get saved with the form and can do some unexpected things. Why not design an unbound form with dropdowns which pull data from your table, checkboxes, etc. Something along the lines of a search engine, and use the results of that form to generate your recordset. Where to go from there will take a bit of thought.

Tom

Live once die twice; live twice die once.
 
Thanks for the responses - mine now delayed by hols.

ChanceD2 - what I'm trying to achieve sounds fairly simple, which is to be able to generate mailmerge letters to people in a contacts database, with variable selection criteria, eg accountants, postcodes starting IP3, with more than 5 employees.

Doing a mailmerge with a parameter query doen't seem to work in Access 2003 but does if the merge is initiated in Word.

These methods all seem a longwinded and Filter by form at least allows me to view records fitting various criteria, and my question was whether the records could then be sent to a mailmerge. Doing so via a command button on the form would be just great.

Thomas - thanks for this suggestion, which I'll look at. Generating the recordset and linking it to a merge are the bits I'm not sure about.


 
Dr. Swamp,

Again, I'm not sure what you are asking. So I am going to tell you how I do this.

1. Create a SQL string that has (a) all of the records that I want to put into the mail-merge and (b) all of the necessary fields for the mail merge.
2. Create a button on a form that calls that SQL string.
NOTE: Behind that button you are going to have to put some code to get the mail merge to work...
3. Create your MS Word document so that you can mail merge TO that document.
4. Create the code, in MS Access, to open the MS Word document and insert the data in the correct locations.
5. Output the document for each record (save it or print it or e-mail it or whatever).
6. Move to next recrod in SQL string and do number 5 again.

Is this what you are doing?
Where is the breakdown?

Let me/us know.

C-D2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top