![]() |
|
#1
|
||||
|
||||
![]() 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] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ahw | Word VBA | 43 | 02-28-2020 08:11 PM |
Drop down list, Can it be done??? | garethreid | Outlook | 0 | 08-09-2012 06:08 AM |
Trouble with drop down list | yessmarie | Word VBA | 1 | 05-25-2012 12:43 PM |
![]() |
sm5948 | Word | 2 | 09-28-2011 05:05 AM |
![]() |
ilkks | Word | 4 | 05-06-2011 12:19 AM |