View Single Post
 
Old 05-01-2021, 10:48 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What I think you want from your description is

Code:
                Select Case .Range.Text
                    Case "MAPD"
                        If ActiveDocument.SelectContentControlsByTitle("Company").Item(1).Range.Text = "AARP" Then
                            'if MAPD and AARP, choices are object1, object2, object3
                            StrOut = "object1, object2, object3"    '"q,w,e"
                        Else
                            StrOut = "item1, item2, item3"
                            'if MAPD and AETNA, choices are item1, item2, item3
                        End If
                    Case "Supplement"
                        StrOut = "1,2,3"
                End Select
You might find Insert Content Control Add-In useful for creating and editing your content controls.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote