![]() |
|
#1
|
||||
|
||||
![]() 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] |
#2
|
|||
|
|||
![]()
That works perfectly! Thank you so much, macropod!!!
![]() |
#3
|
|||
|
|||
![]()
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? |
#4
|
|||
|
|||
![]() Quote:
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
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 |