Word merge doc (1 Viewer)

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
I just spent an considerable amount of time googling How to separate a merge file into separate each page into a separate file. Some I could not understand the accent on YouTube, others were explaining other procurers at the same time. Can somebody give me a line by line?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:16
Joined
Feb 28, 2001
Messages
27,188
Well, basically if you highlight all of the page you want to save, i.e. select the page, then you can use File >> Save As to save that selected piece of the file. Word will save a selection.
 

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
Well, basically if you highlight all of the page you want to save, i.e. select the page, then you can use File >> Save As to save that selected piece of the file. Word will save a selection.
I want to save all the pages to their own file. In other words, I just had 8 letters in a merge. I have been going to each page/letter copy and past into another doc and save with its own name, which takes a long time even with just eight. I am envisioning having as many as 40. I have read that Word can save each page/letter for me, to its own separate file, but I have spent over two hours googling but still haven't got it working
 

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
Here are the videos I watch to learn how to save mail merge into separate files

Mail Merge and Save to Individual Files - YouTube

How to Split Mail Merge into Separate Documents in Microsoft Word - YouTube

MS Word, Mailings merge, split into individual files - YouTube

All say about the same thing

This is what I ended up with (see attachment) Not even sure that is separate files, as they don’t have separate file names. However, when I try attachment in AOL mail it open only the main file which if I send would haven all letters.

I am thinking that maybe there is a better or different way to reach my desired goal. Any suggestions.
 

Attachments

  • printScreen.zip
    99.2 KB · Views: 98

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:16
Joined
Feb 19, 2002
Messages
43,276
The problem is that all the videos are looking at the problem from within Word so from our perspective, they are useless. Since you are controlling the merge from Access, you have a different procedure. You start the way you ALWAYS start when you have multiple reports to print, one for each user. You have an outer loop that passes ONE record at a time to the mail merge EXACTLY as you would pass ONE Employee in to the report if you were printing a separate statement for each employee. As you read each record, you pass the next employee to the report.
 

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
The problem is that all the videos are looking at the problem from within Word so from our perspective, they are useless. Since you are controlling the merge from Access, you have a different procedure. You start the way you ALWAYS start when you have multiple reports to print, one for each user. You have an outer loop that passes ONE record at a time to the mail merge EXACTLY as you would pass ONE Employee in to the report if you were printing a separate statement for each employee. As you read each record, you pass the next employee to the report.
thanks, Pat, I will try it.
 

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
The problem is that all the videos are looking at the problem from within Word so from our perspective, they are useless. Since you are controlling the merge from Access, you have a different procedure. You start the way you ALWAYS start when you have multiple reports to print, one for each user. You have an outer loop that passes ONE record at a time to the mail merge EXACTLY as you would pass ONE Employee in to the report if you were printing a separate statement for each employee. As you read each record, you pass the next employee to the report.
Pat, have finally had time to go over your answer. Thanks, do you have a link to a site that would give me more help doing what you suggest?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:16
Joined
Feb 19, 2002
Messages
43,276
Dick, I looked for you. if I had found one, I would have posted it. I NEVER use mail merge so all I know is every time I tried to use it, I ran into something I couldn't solve. That is why I use OLE automation. Did you try suggestion #5? That is how I would handle it. Each time though the loop prints ONE document for ONE customer or whatever the uniqueID is.

Here is a very simplistic sample of using OLE automation. It prints one document at a time and hardcodes the bookmark names. To make it useful for more than ONE document type or ONE selected ID at a time, you need to modify it.


To print a document for each person, you need a loop. Create a query that selects the IDs of the customers (or whatever). for each iteration in the loop, run the print procedure.

The more complicated concept is how to abstract the bookmark filling. To do that, you need to create a few tables.
1. Document list. Name of the word dot file (safer to use templates) and the name of the query used to fill it.
2. List of all queries used to fill documents
3. List of all fields in each query
4. List of bookmarks in each document with a field that maps to a row in #3

This allows the users, themselves to create new documents and new mapping lists. You have to control #2 and #3 yourself. I have an app that handles all parts of this but it is a very special purpose and uses an ultra normalized table for the variable fields part of it. Essentially, each field becomes a row so the data storage is different from most normal schemas.

I'm working on a more sophisticated sample but it is not yet ready for prime time.
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:16
Joined
Sep 21, 2011
Messages
14,310
Here are the videos I watch to learn how to save mail merge into separate files

Mail Merge and Save to Individual Files - YouTube

How to Split Mail Merge into Separate Documents in Microsoft Word - YouTube

MS Word, Mailings merge, split into individual files - YouTube

All say about the same thing

This is what I ended up with (see attachment) Not even sure that is separate files, as they don’t have separate file names. However, when I try attachment in AOL mail it open only the main file which if I send would haven all letters.

I am thinking that maybe there is a better or different way to reach my desired goal. Any suggestions.
Dick,
First link looks simple enough?
I would use the name or whatever you use to identify them as opposed to title that he used.
Then you would know what each file was for.
 

Dick7Access

Dick S
Local time
Today, 14:16
Joined
Jun 9, 2009
Messages
4,201
Dick, I looked for you. if I had found one, I would have posted it. I NEVER use mail merge so all I know is every time I tried to use it, I ran into something I couldn't solve. That is why I use OLE automation. Did you try suggestion #5? That is how I would handle it. Each time though the loop prints ONE document for ONE customer or whatever the uniqueID is.

Here is a very simplistic sample of using OLE automation. It prints one document at a time and hardcodes the bookmark names. To make it useful for more than ONE document type or ONE selected ID at a time, you need to modify it.


To print a document for each person, you need a loop. Create a query that selects the IDs of the customers (or whatever). for each iteration in the loop, run the print procedure.

The more complicated concept is how to abstract the bookmark filling. To do that, you need to create a few tables.
1. Document list. Name of the word dot file (safer to use templates) and the name of the query used to fill it.
2. List of all queries used to fill documents
3. List of all fields in each query
4. List of bookmarks in each document with a field that maps to a row in #3

This allows the users, themselves to create new documents and new mapping lists. You have to control #2 and #3 yourself. I have an app that handles all parts of this but it is a very special purpose and uses an ultra normalized table for the variable fields part of it. Essentially, each field becomes a row so the data storage is different from most normal schemas.

I'm working on a more sophisticated sample but it is not yet ready for prime time.
Thanks Pat, that will give me something to work on.
 

moke123

AWF VIP
Local time
Today, 14:16
Joined
Jan 11, 2013
Messages
3,920
Sorry for the delay.

Still getting an occasional "Error 462 Remote server machine not available" I think it may be related to the Click to run word in office 365.
If you wait a few seconds and try separate docs again it works.

With the example, select a couple names in the listbox and click merge. Then select the example merge doc and click merge.
the document will open and then close. Then wait a few seconds and click separate documents. It will open the folder with the documents after a few seconds.
If it errors, close the message box, wait, and then click separate docs again. It should work then without error.

It also appends a blank page to the separated docs but haven't figured that out yet either.
 

Attachments

  • Word.zip
    137.3 KB · Views: 106

khoanp250880

New member
Local time
Tomorrow, 01:16
Joined
Feb 16, 2024
Messages
1
Dear Moke123
Please provide instructions on how to automatically save the "merge.888" file located in the C:\Users\user\AppData\Local\Temp directory as a file with UTF-8 encoding.
Thank You !
 

Users who are viewing this thread

Top Bottom