Und noch etwas verbessert aber es tut sich immer noch nichts
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ActiveDocument.ContentControls
If Title = "BackgroundColor" Then
Select Case ActiveDocument.DropdownListEntries.Value
Case Is = "Blue"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(200, 200, 200)
ActiveDocument.Background.Fill.Transparency = 0#
Case "Green"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100)
ActiveDocument.Background.Fill.Transparency = 0#
Case "Orange"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100)
ActiveDocument.Background.Fill.Transparency = 0#
Case "Yellow"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100)
ActiveDocument.Background.Fill.Transparency = 0#
Case "Purple"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100)
ActiveDocument.Background.Fill.Transparency = 0#
Case "White"
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100)
ActiveDocument.Background.Fill.Transparency = 0#
Case Else
End Select
End If
End With
End Sub
|