Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 23 of 23

Thread: Fill Formfields based on DropDown

  1. #21
    You wouldn't know of a way to autosize the content control's drop down list's width based on its contents would you?

    It seems by default its a function of the currently selected item's width.

    Only thing I've figured out so far isn't pretty. I can append a few spaces on the end of my shorter entries, so that all entries end up being the same length. but then I have to but a trim statement in the code when trying to use one of those selected range.texts. It happens to work with the data I presently have, but I can see some shortcomings with the approach if I had different data.

  2. #22
    EDIT:

    Found a better way...

    It seems the width can be manipulated by changing the width an entry, so I modified the first entry to act as a placeholder.

    [VBA]activedocument.SelectContentControlsByTag("panel").Item(1).DropdownListEntr ies.Item(1).Text = "Pick a Panel >"[/VBA]

  3. #23
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,335
    Location
    Keith,

    My middle name. Easy to remember. Pleased I could help. I am sure there is plenty that I could learn from you!!
    Greg

    Visit my website: http://gregmaxey.com

Posting Permissions

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