View Single Post
 
Old 02-04-2019, 11:33 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,372
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