[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to know fill color?

Posted on 2010-09-22
4
Medium Priority
?
528 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:Allen Pitts
  • 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:Allen Pitts
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 2000 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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

A recent Visio zone question asked how to use the data in an Excel file to create a Visio Gantt chart -- and then to dynamically update the Gantt chart. The good news is that the Viso Gantt Chart wizard can be automated. The bad news is that the…
David Parker’s latest book, Microsoft Visio 2010: Business Process Diagramming and Validation, will give you the tools to turn flowcharts and other business diagrams into valuable, data-driven corporate assets. Armed with the knowledge you’ll gain f…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month18 days, 13 hours left to enroll

834 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