How to create dependent content controls drop-down lists with VBA

Hello,

I have a Word form that has a list of options that I want to put as three content controls drop-down lists. The second depends on the first and the third depends on the second. Is it possible to do this through a VBA code? I managed to create code but I used the legacy Drop-down form field and the end form doesn't look as good, the reason why I need to do it through content controls. I also have an excel file with all the possibilities to be chosen. I'm sorry if I'm not super technical, I'm new to all this. Can someone, please, help?
Career-path-EN-FR-13-11-2018.xls
Juliana SantosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
You have posted an Excel workbook. It is difficult to work out its relevance.

Perhaps it would be better to post your code for legacy controls so that we can see what you are trying to do.
Juliana SantosAuthor Commented:
Ok, here they are:

Sub PopulateddDomain()
Select Case ActiveDocument.FormFields("ddRole").Result
Case "Choose an item"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Choose an item"
End With
Case "Application/System Maintenance Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Application/System Maintenance Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Practice Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "DevOps"
End With
Case "Practice Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Developer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analysis Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analysis Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Client Engagement Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Sales Support"
End With
Case "Client Engagement Advisor / Delivery Support"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Delivery Support"
End With
Case "Client Engagement Coordinator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Delivery Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Delivery Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Designer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Desktop Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Desktop Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Desktop Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Domain Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Messaging"
.Add "Network"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
.Add "Telephony"
End With
Case "Integration Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "IPC Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
End With
Case "IPC Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
End With
Case "IPC Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
.Add "Problem Management"
End With
Case "Operator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Server - AS/400"
.Add "Server - Mainframe"
End With
Case "Practice Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Practice Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Project Control & Coordination Analyst / PCO"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PCO"
End With
Case "Project Control & Coordination Analyst / PM1"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PM1"
End With
Case "Project Control & Management Specialist / PCO"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PCO"
End With
Case "Project Control & Management Specialist / PM2"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PM2"
End With
Case "Quality/Compliance Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Security Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Security Infrastructure Support"
End With
Case "Senior Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Client Engagement Coordinator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Senior Desktop Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Senior Developer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Domain Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Messaging"
.Add "Network"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Senior IPC Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
.Add "Problem Management"
End With
Case "Senior Operator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Server - AS/400"
.Add "Server - Mainframe"
End With
Case "Senior Operator/Media"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Media"
End With
Case "Senior Quality/Compliance Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Senior System Administrator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Senior Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Service Desk Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Quality Assurance"
.Add "Queue Management"
.Add "Local Problem Management"
.Add "Workforce Management"
End With
Case "Service Desk Support Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Queue Management"
.Add "Senior/Trainer"
.Add "Service Restoration Management"
.Add "WFM - Reports/Procedures"
.Add "Account Management/Security - Technical"
.Add "RTAC (Remote Desktop)"
End With
Case "Service Desk Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Service Request Management"
End With
Case "System Administrator - Entry"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "System Administrator - Intermediate"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "System Integrator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Systems Analysis Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Technical Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
End Select
End Sub

And this one too:

Sub PopulateddRole()
Select Case ActiveDocument.FormFields("ddStream").Result
Case "Choose an item"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Choose an item"
End With
Case "Application/System Maintenance"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Application/System Maintenance Specialist"
.Add "Application/System Maintenace Team Lead"
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Developer"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Developer"
End With
Case "Asset/Supplier Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Asset Management Administrator"
.Add "Asset Management Analyst"
.Add "Asset Management Leader"
.Add "Asset Management Manager"
.Add "Asset Management Specialist"
.Add "Asset Management Team Lead"
.Add "Practice Advisor"
.Add "Senior Asset Management Analyst"
End With
Case "Business Engineering"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Business Engineering Advisor"
.Add "Business Engineering Leader"
.Add "Business Engineering Specialist"
.Add "Proposal Leader"
.Add "Proposal Management Advisor"
.Add "Proposal Management Coordinator"
.Add "Proposal Management Specialist"
End With
Case "Business Systems Analysis"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Business Systems Analysis Specialist"
.Add "Business Systems Analysis Team Lead"
.Add "Business Systems Analyst"
.Add "Senior Business Systems Analyst"
.Add "Senior Business Systems Architect"
End With
Case "Client Engagement Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Client Engagement Advisor"
.Add "Client Engagement Advisor / Delivery Support"
.Add "Client Engagement Coordinator"
.Add "Client Engagement Leader"
.Add "Client Engagement Manager"
.Add "Client Engagement Specialist"
.Add "Senior Client Engagement Coordinator"
End With
Case "Continuity Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Continuity Management Specialist"
.Add "Continuity Management Team Lead"
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Continuity Management Analyst"
End With
Case "Desktop Delivery"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Desktop Specialist"
.Add "Desktop Team Lead"
.Add "Desktop Technician"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Desktop Technician"
End With
Case "Incident, Problem & Change Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "IPC Analyst"
.Add "IPC Specialist"
.Add "IPC Team Lead"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior IPC Analyst"
End With
Case "Infrastructure"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Infrastructure Team Lead"
.Add "Infrastructure Technician"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Infrastructure Technician"
End With
Case "Job control & Scheduling"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Production Support & Scheduling Analyst"
.Add "Production Support & Scheduling Team lead"
.Add "Senior Production Support & Scheduling Analyst"
End With
Case "Marketing & Solutions Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Marketing & Solutions Leader"
.Add "Product Support Advisor"
.Add "Product Support Manager"
End With
Case "Operations control & Media"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Media Operator"
.Add "Operations Control Team Lead"
.Add "Operator"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Operator"
.Add "Senior Operator/Media"
End With
Case "Operations, Projects & Transitions Delivery"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Data Architect"
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Delivery Team Lead"
.Add "Designer"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior System Administrator"
.Add "System Administrator - Entry"
.Add "System Administrator - Intermediate"
.Add "System Integrator"
.Add "Technical Team Lead"
End With
Case "Project Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Portfolio Manager"
.Add "Program Manager (PM4)"
.Add "Project Advisor (PM3)"
.Add "Project Control & Coordination Analyst"
.Add "Project Control & Coordination Analyst / PCO"
.Add "Project Control & Coordination Analyst / PM1"
.Add "Project Control & Management Specialist"
.Add "Project Control & Management Specialist / PCO"
.Add "Project Control & Management Specialist / PM2"
.Add "Project Management Officer (PMO)"
.Add "Senior Project Management (PM3)"
End With
Case "Quality/Compliance Management"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Quality/Compliance Advisor"
.Add "Quality/Compliance Analyst"
.Add "Quality/Compliance Leader"
.Add "Quality/Compliance Manager"
.Add "Quality/Compliance Specialist"
.Add "Quality/Compliance Team Lead"
.Add "Senior Quality/Compliance Analyst"
End With
Case "Security Services"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Practice Leader"
.Add "Security Administrator"
.Add "Security Advisor"
.Add "Security Analyst"
.Add "Security Specialist"
.Add "Security Team Lead"
.Add "Senior Security Analyst"
End With
Case "Systems Development/Integration"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Integration Team Lead"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Senior Systems Analyst"
.Add "Systems Analysis Specialist"
.Add "Systems Analyst"
End With
Case "Technical Service Desk"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Delivery Leader"
.Add "Delivery Manager"
.Add "Practice Advisor"
.Add "Practice Leader"
.Add "Service Desk Integrator"
.Add "Service Desk Specialist"
.Add "Service Desk Support Technician"
.Add "Service Desk Team Lead"
.Add "Service Desk Technician"
End With
Case "Technology & Solution Architecture"
With ActiveDocument.FormFields("ddRole").DropDown.ListEntries
.Clear
.Add "Client Architect"
.Add "Client Architect Leader"
.Add "Domain Architect"
.Add "Senior Domain Architect"
.Add "Solution Architect"
.Add "Solution Architect Leader"
End With
End Select
End Sub

Sub PopulateddDomain()
Select Case ActiveDocument.FormFields("ddRole").Result
Case "Choose an item"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Choose an item"
End With
Case "Application/System Maintenance Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Application/System Maintenance Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Practice Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "DevOps"
End With
Case "Practice Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Developer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analysis Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analysis Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Client Engagement Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Sales Support"
End With
Case "Client Engagement Advisor / Delivery Support"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Delivery Support"
End With
Case "Client Engagement Coordinator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Client Engagement Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Delivery Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Delivery Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Delivery Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Designer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Desktop Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Desktop Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Desktop Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Domain Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Messaging"
.Add "Network"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
.Add "Telephony"
End With
Case "Integration Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "IPC Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
End With
Case "IPC Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
End With
Case "IPC Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
.Add "Problem Management"
End With
Case "Operator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Server - AS/400"
.Add "Server - Mainframe"
End With
Case "Practice Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Practice Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Project Control & Coordination Analyst / PCO"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PCO"
End With
Case "Project Control & Coordination Analyst / PM1"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PM1"
End With
Case "Project Control & Management Specialist / PCO"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PCO"
End With
Case "Project Control & Management Specialist / PM2"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "PM2"
End With
Case "Quality/Compliance Advisor"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Leader"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Manager"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Quality/Compliance Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Security Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Security Infrastructure Support"
End With
Case "Senior Business Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Business Systems Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Client Engagement Coordinator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Client Delivery"
.Add "Contract Management"
.Add "Delivery Support"
.Add "Sales Support"
End With
Case "Senior Desktop Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Development/Tools Infrastructure Support"
.Add "Imaging"
.Add "Packaging"
.Add "Problem Management/3rd Level Support"
End With
Case "Senior Developer"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Senior Domain Architect"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Messaging"
.Add "Network"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Senior IPC Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Change Management"
.Add "Incident Management"
.Add "Problem Management"
End With
Case "Senior Operator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Server - AS/400"
.Add "Server - Mainframe"
End With
Case "Senior Operator/Media"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Media"
End With
Case "Senior Quality/Compliance Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Compliance Management"
.Add "Quality Management"
End With
Case "Senior System Administrator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "Senior Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Service Desk Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Quality Assurance"
.Add "Queue Management"
.Add "Local Problem Management"
.Add "Workforce Management"
End With
Case "Service Desk Support Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Queue Management"
.Add "Senior/Trainer"
.Add "Service Restoration Management"
.Add "WFM - Reports/Procedures"
.Add "Account Management/Security - Technical"
.Add "RTAC (Remote Desktop)"
End With
Case "Service Desk Technician"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Service Request Management"
End With
Case "System Administrator - Entry"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "System Administrator - Intermediate"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
Case "System Integrator"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Virtualization & Cloud Computing"
End With
Case "Systems Analysis Specialist"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Systems Analyst"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Remedy"
End With
Case "Technical Team Lead"
With ActiveDocument.FormFields("ddDomain").DropDown.ListEntries
.Clear
.Add "Database"
.Add "DevOps"
.Add "Messaging"
.Add "Middleware"
.Add "Network"
.Add "Server - AS/400"
.Add "Server - Mainframe"
.Add "Server - Unix"
.Add "Server - Wintel"
.Add "Server - Citrix"
.Add "Storage"
.Add "System Mgmt Monitoring/Scheduling"
.Add "Telephony"
.Add "Virtualization & Cloud Computing"
End With
End Select
End Sub

Open in new window

Juliana SantosAuthor Commented:
Here's a screenshot of what I'm trying to do. There are three content controls, they are to be selected in order, once the user select the first (Stream), it will open the options available in the second (Role) and then in the third (Domain).
ControlWord.jpg
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

GrahamSkanRetiredCommented:
Still not completely sure what is required, but try this. It works on a document with two dropdown content controls. The first has two entries. When the focus moves away from the first control, the second control is filled from an array. Which array is used depends on the selection made in the first control.
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim List1() As Variant
Dim List2() As Variant
Dim i As Integer

List1 = Array("List1Item1", "List1Item2")
List2 = Array("List2Item1", "List2Item2", "List2Item3")

If ContentControl.Title = "CC1" Then
    Select Case ContentControl.Range.Text
        Case ContentControl.PlaceholderText
        'do nothing
        Case "One"
            With ThisDocument.SelectContentControlsByTitle("CC2")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List1)
                    .DropdownListEntries.Add List1(i)
                Next i
            End With
        Case "Two"
            With ThisDocument.SelectContentControlsByTitle("CC2")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List2)
                    .DropdownListEntries.Add List2(i)
                Next i
            End With
        Case Else
            MsgBox "No action defined for " & ContentControl.Range.Text
    End Select
End If

End Sub

Open in new window

One.docm
Juliana SantosAuthor Commented:
Thank you so much. I'll try and let you know, but for sure I have at least a light at the end of the tunnel to follow.
Juliana SantosAuthor Commented:
hello,

I tried that, but I think I did something wrong. It won't work.
Form-Stream-Role-Domain.docm
Juliana SantosAuthor Commented:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim List1() As Variant
Dim List2() As Variant
Dim i As Integer

List1 = Array("List1Item1", "List1Item2")
List2 = Array("List2Item1", "List2Item2", "List2Item3")

If ContentControl.Title = "Stream" Then
    Select Case ContentControl.Range.Text
        Case ContentControl.PlaceholderText
        'do nothing
        Case "Application/System Maintenance"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List1)
                    .DropdownListEntries.Add "Application/System Maintenance Specialist"(i)
		    .DropdownListEntries.Add "Application/System Maintenace Team Lead"(i)
                Next i
            End With
        Case "Desktop Delivery"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List2)
                    .DropdownListEntries.Add "Delivery Leader"(i)
                Next i
            End With
        Case Else
            MsgBox "No action defined for " & ContentControl.Range.Text
    End Select
End If

End Sub

Open in new window

Juliana SantosAuthor Commented:
I tried to fix what I did wrong, but it is still not working... Can you help?

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim List1() As Variant
Dim List2() As Variant
Dim i As Integer

List1 = Array("Delivery Leader", "Delivery Manager", "Practice Leader", "Security Administrator", "Security Advisor", "Security Analyst", "Security Specialist", "Security Team Lead", "Senior Security Analyst")
List2 = Array("Delivery Leader", "Delivery Manager", "Practice Advisor", "Practice Leader", "Service Desk Integrator", "Service Desk Specialist", "Service Desk Support Technician", "Service Desk Team Lead", "Service Desk Technician")

If ContentControl.Title = "Stream" Then
    Select Case ContentControl.Range.Text
        Case ContentControl.PlaceholderText
        'do nothing
        Case "Security Services"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List1)
                    .DropdownListEntries.Add List1(i)
                Next i
            End With
        Case "Technical Service Desk"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                For i = 0 To UBound(List2)
                    .DropdownListEntries.Add List2(i)
                Next i
            End With
        Case Else
            MsgBox "No action defined for " & ContentControl.Range.Text
    End Select
End If

End Sub

Open in new window

GrahamSkanRetiredCommented:
My example used data from the two arrays to populate the content controls.

Your code doesn't actually use the text from the arrays, but tries to add some text directly. Therefore it doesn't need the array index, (i). In fact it doesn't need to loop either.

I have commented out the indexes and the loop code.

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim List1() As Variant
Dim List2() As Variant
Dim i As Integer

List1 = Array("List1Item1", "List1Item2")
List2 = Array("List2Item1", "List2Item2", "List2Item3")

If ContentControl.Title = "Stream" Then
    Select Case ContentControl.Range.Text
        Case ContentControl.PlaceholderText
        'do nothing - control still showing default text
        Case "Application/System Maintenance"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                'For i = 0 To UBound(List1)
                    .DropdownListEntries.Add "Application/System Maintenance Specialist"  '(i)
		    .DropdownListEntries.Add "Application/System Maintenace Team Lead"  '(i)
               ' Next i
            End With
        Case "Desktop Delivery"
            With ThisDocument.SelectContentControlsByTitle("Role")(1)
                .DropdownListEntries.Clear
                'For i = 0 To UBound(List2)
                    .DropdownListEntries.Add "Delivery Leader" '(i)
                'Next i
            End With
        Case Else
            MsgBox "No action defined for " & ContentControl.Range.Text
    End Select
End If

End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Juliana SantosAuthor Commented:
Hello GrahamSkan,

I know it must be hard as an expert to explain things to nulls like me. But, I tried with your comments and I still cannot see the results I want. :( :(
Form-Stream-Role-Domain.docm
GrahamSkanRetiredCommented:
Sorry. I should have pointed out that the code needs to be in the ThisDocument module in order to catch the Document_ContentControlOnExit event.
Juliana SantosAuthor Commented:
I did put it there, but still no results at all. Content-Control-Properties.jpgForm-Stream-Role-Domain.docm---Word_.jpg
Form-Stream-Role-Domain.docm
GrahamSkanRetiredCommented:
You seem to have had some difficulty in putting the code into the ThisDocument module. I found it in Module4.
Form-Stream-Role-Domain-2-.docm
Juliana SantosAuthor Commented:
Yes!!! It seems to be working now that I put the code into the ThisDocument module. I'll write the rest of it and keep you posted. Thank you very very much :)
Juliana SantosAuthor Commented:
THANK YOU SO VERY MUCH! You were super patient and super knowledgeable. Really appreciated your help. I'll figure it out for the third Content Control now. :) :)
GrahamSkanRetiredCommented:
It is always good to help anyone who wants to and can learn a new skill
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
content control

From novice to tech pro — start learning today.