Store custom color on the palette

X

XP

Using Office 2003 and Windows XP;

In Excel I use the following code to store a custom mixed color on the color
palette:

ActiveWorkbook.Colors(56) = RGB(163, 193, 173)

What is the equivalent code in MS-Word?

Thanks in advance.
 
H

Helmut Weber

Maybe that:

Option Explicit
Dim MyColor(1 To 100) As Long
' ----------------------------
Sub Demo00()
MyColor(56) = RGB(163, 193, 173)
End Sub
' ----------------------------
Sub Demo01()
Selection.Font.Color = MyColor(56)
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
T

Tony Jollans

There is no equivalent. Word does not have a colour palette.

Well, that's not strictly true, but it doesn't have one you can use in the
same way as in Excel 2003.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top