Solved

How to know fill color?

Posted on 2010-09-22
4
505 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
ID: 33736262
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
ID: 33736525
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
ID: 33736576
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
ID: 33737350
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever created a custom Visio stencil – a collection of your own unique master shapes – and then created a drawing by dragging masters onto the drawing page? Have you then made changes to the stencil master and wondered why the shapes on the …
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

864 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

19 Experts available now in Live!

Get 1:1 Help Now