This was really not easy. Programming in VBA is clearly not my strength. I tried to use your latest code, but it don't seem to be stable. After 10-20 executions, it stops working. Now I have made four macros, which I want into one "Select Case" (?). If you could do that for me, I would really much appreciate that! Have used 4 hour at work with this, but are about to give up.
Code:
Sub HvitBlatt()
ActiveDocument.Range.Font.ColorIndex = wdWhite
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 0, 255)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
'
'
'
Sub SvartGul()
ActiveDocument.Range.Font.ColorIndex = wdBlack
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(255, 255, 0)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
'
'
'
Sub HvitSvart()
ActiveDocument.Range.Font.ColorIndex = wdBlack
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(255, 255, 255)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '
'
'
'
Sub SvartHvitt()
ActiveDocument.Range.Font.ColorIndex = wdWhite
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 0, 0)
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub '