Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-13-2019, 05:23 PM
mdlewis mdlewis is offline VBA Split of Mail Merge Doc randomly hangs Windows 7 64bit VBA Split of Mail Merge Doc randomly hangs Office 2010
Novice
VBA Split of Mail Merge Doc randomly hangs
 
Join Date: Jan 2019
Posts: 8
mdlewis is on a distinguished road
Default VBA Split of Mail Merge Doc randomly hangs

I have macro code which splits a merge doc for each record and once split, loads tables from Excel and images from a folder. It works. On my single user machine it splits the docs and fills the tables etc. On a user's via Citrix on a network, it may work totally, or hang randomly after the 1st record's doc is created. I suspect insufficient memory or available virtual disc as the typical user may have many other applications open.

Is there a statement I can include in the code to release memory after each iteration of the splitting loop?

Have other users experienced this problem?
Reply With Quote
  #2  
Old 11-13-2019, 09:01 PM
macropod's Avatar
macropod macropod is offline VBA Split of Mail Merge Doc randomly hangs Windows 7 64bit VBA Split of Mail Merge Doc randomly hangs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Since you haven't posted any code, it's impossible for anyone here to tell what the issue is. That said, see:
Split Merged Output to Separate Documents; and, better still
Send Mailmerge Output to Individual Files,
in the Mailmerge Tips and Tricks 'Sticky' thread at the top of the mailmerge forum:
Mailmerge Tips & Tricks
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-16-2019, 03:07 AM
gmayor's Avatar
gmayor gmayor is offline VBA Split of Mail Merge Doc randomly hangs Windows 10 VBA Split of Mail Merge Doc randomly hangs Office 2016
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

Quote:
Originally Posted by mdlewis View Post
Is there a statement I can include in the code to release memory after each iteration of the splitting loop?
Add the line
Code:
DoEvents
after each iteration.
You may find Merge and Split 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
Reply

Tags
word;maiimerge;vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Split of Mail Merge Doc randomly hangs Mail Merge does not split tables if entry has a number in front B-Man Mail Merge 5 05-19-2019 07:25 AM
VBA Split of Mail Merge Doc randomly hangs Mail Merge - split merged documents and rename each split document based on text in header FuriousD Word VBA 1 05-12-2019 04:06 AM
Help Please: New VBA user trying to use a macro to split Mail Merge documents. Two Run-Time Error zipit189 Word VBA 7 03-18-2015 01:13 PM
VBA Split of Mail Merge Doc randomly hangs Split each page of mail merge into separate pdf Declan Mail Merge 1 05-28-2014 02:02 AM
VBA Split of Mail Merge Doc randomly hangs Automatically split Mail Merge based on number of pages SaneMan Mail Merge 1 12-03-2011 01:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:20 AM.


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