View Single Post
 
Old 06-16-2014, 06:50 AM
orjanmen orjanmen is offline Windows 8 Office 2010 64bit
Novice
 
Join Date: Jun 2014
Posts: 7
orjanmen is on a distinguished road
Default

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 '
Reply With Quote