moke123
AWF VIP
- Local time
- Today, 06:56
- Joined
- Jan 11, 2013
- Messages
- 3,849
Oops. I thought I posted this but it was just saved as a draft
vba_php, the drawback to that code is that it opens 2 instances of word. Upon closing, both instances prompt for you to save the documents. At the very least you should close the un-needed instance programatically.
@Ashfaque I should mention that the example I posted is my version of Albert Kallals code. Mine is a little more complicated due to the manner in which I gather my data for multiple recipients. My code also uses a temp database for the merge table. This allows me to easily add numerous extra merge fields for any record such as dates formatted in different ways or different variations of names ie. Mr. Smith, Jon Smith or Smith, Jon. I also added a library so that documents can be sorted into different categories by folder.
Alberts original code has various options which are described in the comments in the code. For instance he has a MergeSingleWord which only requires I believe one line of code. It can basically be dropped into any project with very little to no changes
vba_php, the drawback to that code is that it opens 2 instances of word. Upon closing, both instances prompt for you to save the documents. At the very least you should close the un-needed instance programatically.
@Ashfaque I should mention that the example I posted is my version of Albert Kallals code. Mine is a little more complicated due to the manner in which I gather my data for multiple recipients. My code also uses a temp database for the merge table. This allows me to easily add numerous extra merge fields for any record such as dates formatted in different ways or different variations of names ie. Mr. Smith, Jon Smith or Smith, Jon. I also added a library so that documents can be sorted into different categories by folder.
Alberts original code has various options which are described in the comments in the code. For instance he has a MergeSingleWord which only requires I believe one line of code. It can basically be dropped into any project with very little to no changes