View Single Post
 
Old 03-15-2022, 02:14 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Oops! Add the following code the the document:
Code:
Private Sub Document_Open()
Dim CCtrl As ContentControl, i As Long
With ActiveDocument
  For Each CCtrl In .ContentControls
    With CCtrl
      If .Title = "Risiko" Then
        If .Type = wdContentControlRichText Then
          .LockContents = False
          .Type = wdContentControlDropdownList
          .DropdownListEntries.Add "Uakseptabel"
          .DropdownListEntries.Add "Akseptabel"
          .DropdownListEntries.Add "Middels"
          .Type = wdContentControlRichText
          .LockContents = True
        End If
      End If
    End With
  Next
  .Saved = True
End With
End Sub
or, if being run from a template, add all the code to that template, along with:
Code:
Private Sub Document_New()
Call Document_Open
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote