Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rash_611
Partner - Contributor III
Partner - Contributor III

Selection color Change

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

2 Replies
rash_611
Partner - Contributor III
Partner - Contributor III
Author

any one plz help me

Anonymous
Not applicable

Hi,

You have to go the document properties -> General -> color scheme -> custom

but the button is not necessary... the macro will affect the document.