![]() |
#1
|
|||
|
|||
![]()
Hello, I am writing a letter that has two drop down fields. Depending on the item selected it references another section of the letter to automatically input data.
i.e in my letter you select the employee's name (dropdown2) and company (dropdown 1) and then it will prepopulate their email. Most employees are First.Last@companya, First.Last@companyc and First_Last@companyb however; one employee "Donald Duck" is First.Last for all three companies. Does anyone know what code I need to type for this? The code I am currently using is: {if{ Dropdown2}= "Mickey Mouse""Mickey"""}{if{ Dropdown2}= "Minnie Mouse""Minnie"""}{if{ Dropdown2}= "Donald Duck""Donald"""}{if{ Dropdown1}= "Company B""_""""}{if{ Dropdown1}= "Company A""."""}{if{ Dropdown1}= "Company C""."""}{if{ Dropdown2}= "Mickey Mouse""Mouse"""}{if{ Dropdown2}= "Minnie Mouse""Mouse"""}{if{ Dropdown2}= "Donald Duck""Duck"""}"""}{if{ Dropdown1}= "Company B""@companyb.com""""}{if{ Dropdown1}= "Company A""@companya.com."""}{if{ Dropdown1}= "Company C""@companyc.ca"""} any suggestions? |
#2
|
||||
|
||||
![]()
Try:
{If{REF Dropdown2}= "Donald Duck" "Donald.Duck{If{REF Dropdown1}= "Company B" "@companyb.com"}"}{If{REF Dropdown2}= "Mickey Mouse" {If{REF Dropdown1}= "Company B" "Mickey_Mouse@companyb.com" "Mickey.Mouse"}}{If{REF Dropdown2}= "Minnie Mouse" {If{REF Dropdown1}= "Company B" "Minnie_Mouse@companyb.com" "Minnie.Mouse"}}{If{REF Dropdown1}= "Company A" "@companya.ca" {If{REF Dropdown1}= "Company C" "@companyc.ca"}} Note: This has nothing to do with macros - it concerns only field coding.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi Paul...I tried copying/pasting the coding you provided but it isn't working for me. I'm fairly new at this and I'm not sure if it is the coding that isn't working, or something I did? Would you be able to add it to the file I uploaded and I can cross reference it with what I have?
|
#4
|
|||
|
|||
![]()
Every pair of braces { } needs to be inserted by using Ctrl+F9. You can't simply type them. They must be inserted in pairs.
Using Fields in Microsoft Word |
#5
|
|||
|
|||
![]()
I did use CtrlF9 to put the brackets in. When I lock the sheet to test the coding Donald Duck and Mickey mouse both work properly but the third name , Minnie Mouse, does not pre-fill like it should.
|
#6
|
||||
|
||||
![]()
Try the attached.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
This works perfectly. Thank you so much!!!
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can someone please help? Cross-references have stopped working in Word 2007 | WaltR | Word | 1 | 12-18-2014 05:28 PM |
How to fix/edit corrupted References in Word 2007 XP sv pk 3 | Hyper-Energy Bob | Word | 3 | 07-08-2014 02:00 PM |
![]() |
SusieBennett | Word | 9 | 06-16-2014 05:58 PM |
![]() |
grantgibson45 | Word | 1 | 07-04-2012 07:16 AM |
Caption woes with cross-references/TOFs (Word 2007) | Jhimmibhob | Word | 0 | 07-27-2011 08:37 AM |