Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    May 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Replace text in document based on drop down menu option

    Hi there,

    I'm trying to replace a paragraph in my Microsoft Word document based on what option is selected from a drop down menu. But for the life of me I can't get it working.

    So far, I've got some VB code display a MsgBox when the drop down menu (Title: TypeOfOption) is exited. But can't seem to progress from here. I've tried looking at examples, but can't seem to find the right one.

    I have seen some { IF { CONDITION } True False } statements around the place, would one of those work? Could anyone give an example?

    Thanks So Much!!

    This is really important, and becoming rather frustrating. Thanks for the help in advanced. If you would like more information, please don't hesitate to ask

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    What kind of dropdown? Userform Listbox? Dropdown Content Control? Dropdown Formfield? ActiveX Listbox?
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    May 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey, thanks for the quick response.

    I believe it's a Drop-Down List as stated in Content Control Properties.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Attached are three documents, showing how you can use a dropdown content control to:
    a) modify the options in another dropdown;
    b) vary the text in another dropdown;
    c) repeat content somewhere else in the document.
    These techniques can be combined into a single document to create a fairly rich form. Although each example uses another content control as the container for the output, the variable and repeated text could be sent to, say, a table cell or a bookmark.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    New Lounger
    Join Date
    Oct 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by macropod View Post
    Attached are three documents, showing how you can use a dropdown content control to:
    a) modify the options in another dropdown;
    b) vary the text in another dropdown;
    c) repeat content somewhere else in the document.
    These techniques can be combined into a single document to create a fairly rich form. Although each example uses another content control as the container for the output, the variable and repeated text could be sent to, say, a table cell or a bookmark.
    Hello I know this is an old thread however, you have accomplished something I have been having great trouble with. I have a form which I would like the selection of my dropdown to change the content on another part of my document. I have very limited word knowledge any help that you can provide will be greatly appreciated.

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Look at the documents that Paul provided. They give great examples.

    Here are two references that may help you.:


    You will want to have the Developer Tab displayed.
    Charles Kyle Kenyon
    Madison, Wisconsin

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •