Visio Diagrams with Python: Colors

24 Colors to choose from.

„Cells“ contain all „Shape-Format“-Properties

Details: https://docs.microsoft.com/en-us/office/client-developer/visio/cells-visio-shapesheet-reference

# Line-Color
# https://docs.microsoft.com/de-de/office/client-developer/visio/linecolor-cell-line-format-section
oval2.Cells("LineColor").FormulaForce = 3

# Fill-Color
# https://docs.microsoft.com/de-de/office/client-developer/visio/fillforegnd-cell-fill-format-section
rect1.Cells("FillForegnd").FormulaForce=3

# Fill-Pattern "0" - no fill
# https://docs.microsoft.com/de-de/office/client-developer/visio/fillpattern-cell-fill-format-section
rect2.Cells("FillPattern").FormulaForce=0

# Fill-Pattern "3"

# yellow background
# https://docs.microsoft.com/de-de/office/client-developer/visio/fillbkgnd-cell-fill-format-section
#
# light-blue foreground
#
oval1.Cells("FillPattern").FormulaForce = 3
oval1.Cells("FillBkgnd").FormulaForce = 5
oval1.Cells("FillForegnd").FormulaForce = 7

Result

Schreibe einen Kommentar