![]() |
|
#1
|
|||
|
|||
![]()
Thank you for all of your help....That is just what I needed.
|
#2
|
|||
|
|||
![]()
Paul,
Everything that you have helped we with is working fantastic, the question I have is. I have the drop down lists of my customers in 9 different places on my document, Is there a way to add a new customer to all of the drop down lists at the same time or do I need to add the customer to each drop down list in in the document individually. Last edited by maverick561145; 11-30-2015 at 12:05 PM. Reason: missed a word |
#3
|
||||
|
||||
![]()
Please be clear about your requirements - do you have nine dropdowns, each of which someone can choose a customer from, or do you have one dropdown that outputs the selection to eight different locations? These are entirely different things.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
I have nine seperate dropdown boxs that you need to choose a customer from.
|
#5
|
||||
|
||||
![]()
In that case, you need to add all the choices to all 9 dropdowns. You could, of course, just create one dropdown with all the choices, then copy/paste that dropdown to each of the other 8 locations.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
Thanks a lot, Macropod!
I've got another question, though. Unfortunately I'm absolutely new on macros... I copied the macro from the template you posted in the beginning. Then I copied the box twice, because I need two drop-down boxes next to each other in my template (that didn't work, the second box triggered a change under the first box). I want the two drop-down boxes to work individually. The output shall appear right under the box (just like in the template you posted). How do I have to change the macro/ What shall I do? Hope my question is sufficiently precise... I'd be super grateful for any help! Regards, Tim |
#7
|
||||
|
||||
![]()
If you want independent dropdowns, simply don't give them both the same title. The demonstration one is titled 'Client'. If you want the second one to trigger its own set of outputs, the existing code would need to be supplemented with its own processes within the ContentControlOnExit macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
Thanks again, macropod!
I just tried adding a changed process to the code. It didn't work out, though. My knowledge about macros isn't sufficient I guess. Could you, or anybody else in here, post the code that would make my template work? As usual I'd be very grateful for any help ![]() Thank you, have a good one. Regards Tim |
#9
|
||||
|
||||
![]()
Not without knowing what your template contains and how you intend it to function. Can you attach it to a post (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
![]()
Cheers!
On the second page you'll find a box containing two cells. The left cell already works as it's supposed to: I can select an entry from a drop-down list and that triggers an entry below the drop-down. That's exactly what you posted (I used your macro). The right cell shall work exactly the same way, but independently from the left cell. I want to be able to select entries in each cell (drop-down) which then triggers a line right under each drop-down. Please let me know, if I explained insufficiently. Thanks a lot!!! Regards Tim |
#11
|
||||
|
||||
![]()
Given that the second cell doesn't even have any content controls, I can only guess at what you want.
Suppose the dropdown content control in the 1st cell is titled 'ClientA' and the dropdown content control in the 2nd cell is titled 'ClientB'. Suppose also the text content control in the 1st cell is titled 'ClientDetailsA' and the text content control in the 2nd cell is titled 'ClientDetailsB'. In that case, you could use a macro like: Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Application.ScreenUpdating = False Dim i As Long, StrDetails As String With ContentControl If .Title = "ClientA" Then For i = 1 To .DropdownListEntries.Count If .DropdownListEntries(i).Text = .Range.Text Then StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11)) Exit For End If Next With ActiveDocument.SelectContentControlsByTitle("ClientDetailsA")(1) .LockContents = False .Range.Text = StrDetails .LockContents = True End With ElseIf .Title = "ClientB" Then For i = 1 To .DropdownListEntries.Count If .DropdownListEntries(i).Text = .Range.Text Then StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11)) Exit For End If Next With ActiveDocument.SelectContentControlsByTitle("ClientDetailsB")(1) .LockContents = False .Range.Text = StrDetails .LockContents = True End With End If End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
![]()
That works perfectly! Thank you so much, macropod!!!
![]() |
#13
|
|||
|
|||
![]()
Hi, When trying this I could never get it to work in my document, although it worked fine in yours. I believe I have narrowed the problem down to this:
Within my document, an invoice, I want everything to be capitalized regardless of whether the user has Caps Lock on, so within font properties, I had All Caps selected. I found that turning off All Caps fixed the issue. I also found that on your example document, by selecting all and enabling All Caps, this also broke the information from appearing. Any thoughts as to why having All Caps on would break the information from appearing in the 2nd field? |
#14
|
|||
|
|||
![]() Quote:
|
#15
|
||||
|
||||
![]()
This has nothing to do with whether the Caps Lock key is on or whether you're using All Caps but with whether you're calling the output content control with the correct name in the code -
CLIENTDETAILS is not the same as: ClientDetails In the code, the names are case-sensitive. As for capitalising whatever the ClientDetails control displays, that can be accomplished by changing: .Range.Text = StrDetails to: .Range.Text = UCase(StrDetails) though you should, perhaps, be capitalising whatever you're inputting into the 'Client' content control to begin with.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
dudeabides | Office | 1 | 07-04-2011 02:49 AM |
Multiple task lists and multiple calendars | kballing | Outlook | 0 | 01-18-2011 10:23 AM |
Creating Multiple Contact Lists | meltee78 | Outlook | 1 | 01-03-2011 09:45 PM |
multiple calendar entries across a group | halfhearted | Outlook | 0 | 10-11-2009 12:13 PM |
Word Forms : Dropdown lists | wferaera45 | Word | 0 | 04-06-2006 03:02 AM |