From: Dustin on 7 May 2010 16:04 I am working in Microsoft Word, we have a permit form that has a dropdown box that has two options either Full LDP or Perimeter LDP. I want the following to be displayed in a text field in the form later on. the text field is text19. How can i write an IF then statement that recognizes which option was selected from the dropdown box and then displays "This permit is for construction of perimeter erosion controls ONLY." in the text19 field?
From: Doug Robbins - Word MVP on 7 May 2010 18:18 To start with, you should assign meaningful bookmark names to your formfields as it will make your macro coding much easier to understand. To do what you want to do, you would need to run a macro containing the following code on exit from the DropDown formField With ActiveDocument If .FormFields("LDPDropDown").Result = "Perimeter LDP" then .FormFields("LDPText").Result = "This permit is for construction of perimeter erosion controls ONLY." Else .FormFields("LDPText").Result = "Something Else" End If End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Dustin" <Dustin(a)discussions.microsoft.com> wrote in message news:52CC5F31-AE24-427D-9354-228BB16AA924(a)microsoft.com... > I am working in Microsoft Word, we have a permit form that has a dropdown > box > that has two options either Full LDP or Perimeter LDP. I want the > following > to be displayed in a text field in the form later on. the text field is > text19. How can i write an IF then statement that recognizes which option > was > selected from the dropdown box and then displays "This permit is for > construction of perimeter erosion controls ONLY." in the text19 field?
From: Graham Mayor on 8 May 2010 01:27 If you replace the 'Text19' field with a conditional field and the dropdown is Dropdown1 and you check the calculate on exit check box of the Dropdown field, you don't need a macro. { IF{ Dropdown1 } = "Perimeter*" "This permit is for construction of perimeter erosion controls ONLY" "The text for full" } -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Dustin" <Dustin(a)discussions.microsoft.com> wrote in message news:52CC5F31-AE24-427D-9354-228BB16AA924(a)microsoft.com... >I am working in Microsoft Word, we have a permit form that has a dropdown >box > that has two options either Full LDP or Perimeter LDP. I want the > following > to be displayed in a text field in the form later on. the text field is > text19. How can i write an IF then statement that recognizes which option > was > selected from the dropdown box and then displays "This permit is for > construction of perimeter erosion controls ONLY." in the text19 field?
|
Pages: 1 Prev: vba replace for improper page breaks in Word 2003 Next: Need Excel code to work in Word |