Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2023, 04:48 AM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default Mail Merge Output to Different Files not working

I want to save each MailMerge output file as a separate, individual file.



I know this question has been asked to death and I've seen the tips and tricks page.

I have followed all instructions in Installing Macros (on how to install a macro) and https://www.msofficeforums.com/mail-...ps-tricks.html ("Send Mailmerge Output to Individual Files" section).

The macro shows up and there doesn't seem to be any errors in the code, especially since I am merely copying and pasting. However, nothing happens when I click on the "Edit Individual Documents" button.

Alternatively, I also tried the "Send MailMerge Output to Individual Files" option. While the macro appeared to run, it kept saving over my files (the heading for all files is all the same and I cannot change it for internal policy reasons. But in any case, the file that is generated from this code makes the formatting of my document go haywire - all my numberings and indentations and paragraphing is gone.

Can anyone help troubleshoot why this is not working for me? I'm using Office365.

(as a side note, I can't believe Microsoft has not yet included this as a built-in function???)
Reply With Quote
  #2  
Old 04-11-2023, 08:47 PM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Because there is no in-built function for this, I created one Merge and Split. Maybe you will find it useful.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 04-12-2023, 11:39 PM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

Thank you, I found that in my searches as well but didn't download it as I thought it was only compatible for up to Office 2019.

Is it also compatible with Office 365? If so, I would love to give it a try.
Reply With Quote
  #4  
Old 04-13-2023, 03:28 AM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It is compatible with all versions 32 and 64 bit from Word 2007 to the present.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 04-16-2023, 07:36 PM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

Thank you, it worked well!

I realise that all my clause references are removed in the output though (and this is the same even with the regular MailMerge option).

I work with legal documents so there are a lot of clause references but MailMerge converts them to static text. Is there perhaps any fix or workaround for this?
Reply With Quote
  #6  
Old 04-17-2023, 08:41 PM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I would need more information and preferably a sample document to ascertain the nature of the problem,
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 04-19-2023, 04:37 AM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

Thanks for offering to look into this.

I have created a sample contract document and linked excel file here Update your browser to use Google Drive, Docs, Sheets, Sites, Slides, and Forms - Google Drive Help

While the sample contract contains mostly lorem ipsum text (for confidentiality reasons), I have retained some clause and annexure references in the manner that I usually use them in contracts, these are all highlighted in yellow for easy reference. There is also a contents page since longer contracts will need them.

Details of the issue
In my base template, all the clause references are properly linked, so ctrl+click on the reference "Annexure C" in the main body of the text will bring me directly to Annexure C of the document. Even when I export this to PDF, the clause referencing and hyperlinking works.

However, after I complete the MailMerge process, these clause references no longer work, whether the output is in DOC/DOCX/PDF format. The table of contents seems to contain some hyperlinks but clicking on them does nothing (and the formatting of the table of contents changes). Each of the individual clause references are now static text and I cannot ctrl+click on them to bring me to the exact position in the document that they appear.

I could live without these clause references in a short contract, but unfortunately these are important for the longer contracts. Any help would be greatly appreciated, but no worries if it is not something that can be fixed. I will probably just have to go back to doing things the long way.
Reply With Quote
  #8  
Old 04-19-2023, 06:54 AM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

While I can see what you mean, I also cannot see a simple solution to the problem and as I am in the process of relocating to the UK, I don't have time to explore this in greater depth at present.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #9  
Old 04-19-2023, 10:19 AM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

No worries at all and appreciate your help. Wishing you a smooth and safe relocation process!
Reply With Quote
  #10  
Old 04-19-2023, 09:03 PM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Actually I have thought of a way to address this problem.

If you install my Many To One mail merge add-in and use it in One to One mode to merge the document with its data, the cross references are preserved. This is because the process does not use mail merge, except as a means of inserting placeholders for the data. The merge document is used as a template and filled each time with the data for the records being merged.

Merge Many To One
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #11  
Old 04-21-2023, 04:44 AM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

I see - I will give this a try next week and update you on the results. Thanks!
Reply With Quote
  #12  
Old 04-27-2023, 06:10 AM
Rachquit Rachquit is offline Mail Merge Output to Different Files not working Windows 11 Mail Merge Output to Different Files not working Office 2021
Novice
Mail Merge Output to Different Files not working
 
Join Date: Apr 2023
Posts: 7
Rachquit is on a distinguished road
Default

Reporting back!

The Many-to-One add-in is so complex that a lot of it is flying over my head - my own problem. I will continue to try and figure it out and in the meantime I will use the simpler Merge and Split add-in instead for shorter documents where the clause reference hyperlinks are not crucial.

If you don't mind, I have been exploring your other works (you are a true hero and I appreciate all the work you've done for the community), and have a couple of quick queries on some of them - but these are not urgent at all and they can certainly wait.

1. Multiple Document Merge: I test ran it using your Example Data set and my own data set and found that when I ran the process, the system would constantly prompt me to run the SQL command "SELECT * FROM 'Sheet1$' and then I have to navigate to the folder and select the excel sheet again for each separate document. This means if I have 3 documents for output and 5 datasets, I get 15 prompts and have to navigate to find the excel sheet 15 times. Am I perhaps doing something wrong?

2. Boilerplate: Is there a simple way to remove only one boilerplate from the long list of boilerplates I have created? I tried deleting the reference document in the folder but it continued to show up in the add-in list. I couldn't amend the table in the template document to remove just that one line either. So far I found that I have to (i) delete the reference document in the folder, (ii) reset the whole add-in and (iii) relink the folder so that everything is repopulated without the deleted boilerplate.
Reply With Quote
  #13  
Old 04-27-2023, 08:25 PM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Output to Different Files not working Windows 10 Mail Merge Output to Different Files not working Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

1. For what you are doing, you need to select the one to one merge option, then you only need to select a key field, which is a field the value of which changes with each record and a field to name the files.
2. The SQL security warning can be turned off from the add-in's ribbon tab.
3. I am not sure what you are referring to regarding Boilerplate.
You can contact me via my web site for information about the site, but bear in mind that I am in the process of relocating to the UK and my office is currently in a container at Limassol port awaiting shipment next month.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Output to Different Files not working Send Mailmerge Output to Individual Files from tips & tricks not working alexandersmit Mail Merge 2 11-02-2020 02:48 PM
Mail Merge Output to Different Files not working Name of source file in mail merge output MichalJankowski Mail Merge 1 02-11-2017 04:45 AM
Printing a Mail Merge output file Ar-Pharazon Mail Merge 7 09-13-2014 07:11 AM
mail merge – output to .pdf eNGiNe Mail Merge 3 09-29-2013 11:45 PM
Mail Merge Output to Different Files not working Characters changing between software and mail merge output?? Calastein Mail Merge 3 05-04-2011 01:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft