![]() |
#3
|
|||
|
|||
![]()
Hi,
I've Tried using the following code. But it is returning Run time error. Please see attached screen of error. Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim i As Long, StrDetails As String With ContentControl If .Title = "Name" 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 ActiveDocument.SelectContentControlsByTitle("Details").Item(1).Range.Text = StrDetails End If End With End Sub My document is not protected. And i don't understand why i am getting this error. Could you please tell how to fix this? Thanks Laxman |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |
![]() |
SuzeG | Word VBA | 10 | 12-08-2013 08:04 AM |
![]() |
BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |
![]() |
Anja | Word | 2 | 10-16-2013 09:56 AM |
Retrieving content control value | jillapass | Word VBA | 4 | 05-24-2012 05:07 AM |