Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2019, 11:33 PM
macropod's Avatar
macropod macropod is online now Start MailMerge for 3 different Word documents in Excel depending on value in column A Windows 7 64bit Start MailMerge for 3 different Word documents in Excel depending on value in column A Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Quote:
Originally Posted by Kalü View Post
I didnt know word can handle if functions that refer to a value in excel.
They don't. Word IF fields can be used to test the mergefield value of each record in your column A.
The fields would be constructed along the lines of:
{IF{MERGEFIELD LetterType}= "1" "All the content for letter 1 goes here"}{IF{MERGEFIELD LetterType}= "2" "All the content for letter 2 goes here"}{IF{MERGEFIELD LetterType}= "3" "All the content for letter 3 goes here"}
or:
{IF«LetterType»= "1" "All the content for letter 1 goes here"}{IF«LetterType»= "2" "All the content for letter 2 goes here"}{IF«LetterType»= "3" "All the content for letter 3 goes here"}

If the letters have the same opening/closing content, that content can be left outside the fields so there's only one version to maintain.

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required. The only potentially-significant limitation is that the content inside the double quotes cannot include more double quotes, but even that can be worked around via the use of paired single quotes.

As for:
Quote:
Originally Posted by Kalü View Post
So thanks for your help ---- NOT
If you want to be rude, just go away. It is you, after all, who keeps making dumb statements about what you think Word can and cannot do without bothering to accept or try the advice you've been given by those even you admit are more skilled than you.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Start MailMerge for 3 different Word documents in Excel depending on value in column A Mailmerge Excel with a Master Word Template (via VBA) stevenel Excel Programming 8 08-14-2018 03:05 PM
Start MailMerge for 3 different Word documents in Excel depending on value in column A Rounding Up or Down depending on Start & End time richardst Excel 4 06-21-2016 06:03 PM
Marking specific cells depending on start and end time entered ellebb85 Excel Programming 0 01-17-2016 02:50 AM
Start MailMerge for 3 different Word documents in Excel depending on value in column A documents saved with double column revert to single column when re-opened danw Word 6 04-08-2015 06:24 AM
Merge Word documents using a mailmerge field Concertina Mail Merge 3 02-18-2013 04:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:47 PM.


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