Thanks!
It's giving me an error msg, I think my code is wrong but don't know enough about Word to make it right.
Any ideas on what's wrong or any good forums like this one specific to Word?
Ah, ok. I was able to get it to work in my sample document.
Word uses different properties than Excel. So for example, the value of the dropdown controls is returned by Result, not Value. Go figure. This worked for me:
Code:
Sub email2()
If ActiveDocument.FormFields("Dropdown2").Result = "Mike Smith" Then
ActiveDocument.FormFields("Dropdown3").Result = "1111"
ActiveDocument.FormFields("Dropdown4").Result = "Mike"
End If
End Sub
You also need to make sure you have the spelling of the fields *exact*. "DropDown2" is not the same as "Dropdown2" which is the default capitalization Word uses.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.