Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have written the below code to change the selection color and written the trigger for a button to run the macro... but color is not changing instead if i give "test" in macro editor it is working... Kindly suggest me on the same.
sub ChangeColor()
set up = ActiveDocument.GetApplication.GetUserPreferences
up.CustomSelBgColor(1).PrimaryCol.Col = RGB(19,255,143)
up.CustomSelBgColor(2).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelBgColor(3).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelBgColor(4).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelBgColor(5).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelBgColor(6).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelBgColor(7).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelFgColor(1).PrimaryCol.Col = RGB(255,255,255)
up.CustomSelFgColor(2).PrimaryCol.Col = RGB(0,0,0)
up.CustomSelFgColor(3).PrimaryCol.Col = RGB(0,0,0)
up.CustomSelFgColor(4).PrimaryCol.Col = RGB(0,0,0)
up.CustomSelFgColor(5).PrimaryCol.Col = RGB(0,0,0)
up.CustomSelFgColor(6).PrimaryCol.Col = RGB(0,0,0)
up.CustomSelFgColor(7).PrimaryCol.Col = RGB(0,0,0)
ActiveDocument.GetApplication.SetUserPreferences up
msgbox "done"
end sub
Regards,
Grace
any one plz help me
Hi,
You have to go the document properties -> General -> color scheme -> custom
but the button is not necessary... the macro will affect the document.