Results 1 to 4 of 4
  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
    3,892
    Thanks
    0
    Thanked 188 Times in 172 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
    3,892
    Thanks
    0
    Thanked 188 Times in 172 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]

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
  •