Solved

How to know fill color?

Posted on 2010-09-22
4
514 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

The Question Several times in recent years, someone has posted a question at EE asking whether they could display the Windows directory structure – folders and subfolders – using Visio. When one person specifically asked about displaying directory …
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 lists. We’ll explore containers and callouts in separate articles. Prior to reading th…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

726 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