Thread: [Solved] AutoFill Information
View Single Post
 
Old 04-12-2021, 02:58 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
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

Quote:
Originally Posted by shaun0406 View Post
My field code is
{IF { Company }="X" "(111)111-1111" {IF {Company}="Y" "(234)567-8910"}}}

After protecting the document, for example, selecting "X" from the drop down list doesn't update the field code I wrote for autofill phone numbers when a Company drop down list have been selected

Please give help or give me suggestions as what I am doing wrong.
The problem is the way you're referencing the dropdown, plus the lack of required spaces in the field code. Instead of:
Code:
{IF { Company }="X" "(111)111-1111" {IF {Company}="Y" "(234)567-8910"}}}
use:
Code:
{IF{REF Company}= "X" "(111)111-1111"}{IF{REF Company}= "Y" "(234)567-8910"}
As Charles said, though, you really shouldn't use formfields and content controls in the same document; they don't play well together.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote