How to write conditional statements in Word

D

DRAFT

I need to add a conditional statement to a word template. I need to one drop
down box to show a value based on a selection from a different drop down box.
 
G

Greg Maxey

You could run an on exit macro from the first dropdown to set the value of
the second:

Sub ScratchMacro()
Dim oDoc As Document
Set oDoc = ActiveDocument

If oDoc.FormFields("Dropdown1").Result = "Condition A" Then
oDoc.FormFields("Dropdown2").Result = "Alpha"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top