Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-28-2017, 07:28 AM
JLavigne JLavigne is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Feb 2017
Posts: 5
JLavigne is on a distinguished road
Default Help in creating a button to add lines of text/options

Good day,
I'm trying to create a template letter for my organization and I've hit a wall. We previously had a PDF form where we could click on a " + " button and a line of text would appear. However, the PDF form was complicated to modify so it was decided to transfer the info in a Word document.

Everything works fine, but people are feeling nostalgic, they would like a button that could add the lines of text they would like to use in the letter. So basically, this letter has a drop down list of 6 items that the employees can choose from. Because I wasn't able to add that " + " button, I had to create 6 lines of drop down list boxes (people would select their options and remove the extra lines if not necessary in the letter).

Is there a way to create a button (that won't appear in the printed letter) that could be besides only one drop down list box, which would act as a "duplicator?" for that line, which would permit to add any other extra lines if necessary, instead of having all 6 and removing the unnecessary ones...

Any ideas?



Thank you very much for your help!!!
J
Reply With Quote
  #2  
Old 09-28-2017, 04:14 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,319
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

In Word, you'd ordinarily manage this kind of thing via a userform attached to the document's template. Depending on how it's implemented, the userform could open when:
creating a new document from the template;
opening any document based on the template; and/or
invoked via a macro/shortcut.
See attached demo document; it's a pretty basic implementation with 8 choices. Simply scroll up/down, then click on a choice to see the document get updated. Closing the userform will retain the text corresponding with the choice in the document. The userform & code are accessible via Alt-F11. For more info on userforms, see: http://www.gmayor.com/Userform.htm
Attached Files
File Type: doc Userform Dropdown Demo.doc (58.5 KB, 3 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 09-29-2017, 12:32 PM
JLavigne JLavigne is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Feb 2017
Posts: 5
JLavigne is on a distinguished road
Default

Good day,
Thank you Macropod for that reply, however it doesn't seem to explain what I'd like to do. I've tried to attach an example, it didn't work... so I'll try to do a little demo here... So I have this drop down list which has 6 items. This drop down list is repeated 6 times like this:
- Select Option
- Select Option
- Select Option
- Select Option
- Select Option
- Select Option

This "Select Option" is repeated 6 times because we need to be able to select multiple answers. What I would like to do is remove 5 of those lines, keep only the top one and add a "+" button or something or function button that would let me copy that top line under it and allow me to select an option from those 6 items. And I'd like to do it at least 6 times to cover all scenarios.

Not sure it is feasible right??

Thanks anyway for any input.
J
Reply With Quote
  #4  
Old 09-29-2017, 02:40 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,319
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

In that case, you wouldn't use a dropdown, since dropdowns only allow one item to be selected. Instead, the formfield would list each of the 6 items with a checkbox against each. See attached.
Attached Files
File Type: doc Userform Checkbox Demo.doc (50.5 KB, 6 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 10-04-2017, 11:09 AM
JLavigne JLavigne is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Feb 2017
Posts: 5
JLavigne is on a distinguished road
Default

Thank you for this, I'll look more into it for sure to try to find a way to get it working.


J
Reply With Quote
Reply
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to add space between lines of bulleted text and a new header but both lines are moving??? Martin_d35 Word 2 02-10-2017 07:13 AM
Options Button GroupName not working mr_nismo Word 1 08-13-2015 07:00 PM
Creating More Lines of Text in a Different Paper Size Rachall Word 2 07-14-2015 04:43 PM
Creating a macro button in powerpoint Sammie0Sue PowerPoint 1 12-06-2013 05:51 AM
Radio (options button) problem Niros Excel 1 11-24-2005 09:58 AM


All times are GMT -7. The time now is 09:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft