Solved

How to know fill color?

Posted on 2010-09-22
4
506 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visio: Problem inserting linfeed in Shape.Text using vba 5 811
Visio 2013 Standard vs Pro 3 108
Topology_issues 3 53
How can I populate VISIO from T-SQL? 7 63
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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

831 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