Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2014, 05:35 AM
macropod's Avatar
macropod macropod is offline Drop Down List Help Windows 7 32bit Drop Down List Help Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,341
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Down List Help How to import list from Excel into drop-down list into word 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
Drop Down List Help Drop Down List using SYMBOLS sm5948 Word 2 09-28-2011 05:05 AM
Drop Down List Help How to unlock Drop-Down list ilkks Word 4 05-06-2011 12:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft