Background color ENum values

P

PP

Hi Al

In this code below, I set fore-ground color using the code
vsoItem.Cells("Fillforegnd") = 1 and vsoItem.Cells("Fillforegnd") =
where 1 = White & 4 = Blue.
Can somebody tell me where can I get complete list of number & what color that stand for

Private Sub Document_DocumentOpened(ByVal doc As IVDocument
Dim vsoPage As Visio.Pag
Dim vsoDocument As Visio.Documen
Dim vsoDocuments As Visio.Document
Dim vsoPages As Visio.Page
Dim vsoItem As Visio.Shap
Dim vsoItems As Visio.Shape

'Iterate through all open documents
Set vsoDocuments = Application.Document

'---------------------------------------------
Dim vsoStyles As Visio.Style
Dim vsoStyle As Visio.Styl
'---------------------------------------------
For Each vsoDocument In vsoDocument
Set vsoPages = vsoDocument.Page
For Each vsoPage In vsoPage
Set vsoItems = vsoPage.Shape
For Each vsoItem In vsoItem
If Len(vsoItem.Name) >= 7 The
If LCase(Mid(vsoItem.Name, 1, 7)) = "process" The
MsgBox vsoItem.Characters.Tex
'--------------------------------------------------
' Now filling color in the boxe
'--------------------------------------------------
vsoItem.Cells("Fillforegnd") =
MsgBox vsoItem.Characters.Tex
vsoItem.Cells("Fillforegnd") =
'--------------------------------------------------
End I
End I
Nex
Nex
Nex
End Su
 
C

Chris Roth

If you go to the Format > Fill dialog box, you will see dropdown lists for
foreground and background colors. There are numbers next to the items in the
drop-down lists. These correspond to the numbers you need for the
ShapeSheet.

Note, it is possible for the color pallette in a drawing to be changed. It
doesn't happen very often, but if it is changed then, say, #2 might not be
red anymore. To be absolutely sure, you can use the ShapeSheet formulas RGB
or HSL to control your colors.

For instance:

= RGB( 240, 0, 0 )

is the nice, bright red that we all know and love.

--

Hope this helps,

Chris Roth
Visio MVP
visioguy @ extremely warm mail.com




PP said:
Hi All

In this code below, I set fore-ground color using the code
vsoItem.Cells("Fillforegnd") = 1 and
vsoItem.Cells("Fillforegnd") = 4
 
P

PP

Currently it display only 16-19 colors with their numbers, how about the rest of them, is there any documentation / URL which can give me the number for the rest of them ?
 
C

Chris Roth

Not sure what the question is, but I posted this a few weeks ago in response
to a color question, perhaps it will help:

----------------
If you go to the Format > Fill dialog box, you will see dropdown lists for
foreground and background colors. There are numbers next to the items in the
drop-down lists. These correspond to the numbers you need for the
ShapeSheet.

Note, it is possible for the color pallette in a drawing to be changed. It
doesn't happen very often, but if it is changed then, say, #2 might not be
red anymore. To be absolutely sure, you can use the ShapeSheet formulas RGB
or HSL to control your colors.

For instance:

= RGB( 240, 0, 0 )

is the nice, bright red that we all know and love.

----------------

Hope this helps,

Chris Roth
Visio MVP
visioguy @ extremely warm mail.com



PP said:
Currently it display only 16-19 colors with their numbers, how about the
rest of them, is there any documentation / URL which can give me the number
for the rest of them ?
 

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

Similar Threads


Top