Thread: [Solved] Drop Down List Help
View Single Post
 
Old 05-09-2014, 05:35 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That link only shows one of numerous ways to 'skin the cat'. Another approach would be to embed the output text in the macro itself. For example:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim StrDetails As String
With ContentControl
  If .Title = "Client" Then
    Select Case .Range.Text
      Case "Roundhouse Nurseries"
        StrDetails = "Phone: 08 1111 1111" & vbCr & _
            "Fax: 08 2222 2222" & vbCr & _
            "Email: sales@roundhousenurseries.com.au"
      Case "Smiths Wholesales"
        StrDetails = "Phone: 08 3333 3333" & vbCr & _
            "Fax: 08 4444 4444" & vbCr & _
            "Email: sales@smithswholesales.com.au"
      Case Else: StrDetails = ""
    End Select
  ActiveDocument.ContentControls(2).Range.Text = StrDetails
  End If
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote