Solved

How to know fill color?

Posted on 2010-09-22
4
503 Views
Last Modified: 2012-05-10
Good morning expert,

Have shape A with fill color blue. Add shape B with no fill color. Want to specify fill color blue for shape B. So select shape A, Fill, Fill Options. But don't see anyway of discovering what the fill color is. Click on 'Color' and it dosen't seem to show which fill color is selected.
Am I missing something?
Thanks
Allen
0
Comment
Question by:9apit
  • 2
4 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Try:

application.ActiveDocument.Pages(1).Shapes(1).Cells("Fillforegnd")
and to set
application.ActiveDocument.Pages(1).Shapes(1).Cells("Fillforegnd") = 1 '... etc.

Chris
0
 

Author Comment

by:9apit
Comment Utility
Good afternoon Mr. Bottomley,

I am impressed by your use of Visual Basic or applications in Visio.
But what I was looking for was how to discover the fill color of shape
so that I could specify that fill color in another shape using the
controls on the ribbon.

Does the code you wrote set the fill prgramatically? If so are you setting the
fill to '1'?

Thanks

Allen in Dallas


0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
Comment Utility
application.ActiveDocument.Pages(1).Shapes(1).Cells("Fillforegnd")

Is the fill color of shape 1 in this instance

application.ActiveDocument.Pages(1).Shapes(1).Cells("Fillforegnd") = 1

Sets the color of shape 1 to 1

Whereas

application.ActiveDocument.Pages(1).Shapes(2).Cells("Fillforegnd") = application.ActiveDocument.Pages(1).Shapes(1).Cells("Fillforegnd")

Applies the current fill color of shape 1 to the shape 2 fill

Chris
0
 
LVL 4

Expert Comment

by:MtnChick
Comment Utility
Maybe this is simpler than you were looking for but you can go to Fill->Color->More colors->Custom.  It gives a number value for each of the primary colors.  True red will be 255 red and 0 for both blue and green.  You can apply these values to any fill.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now