Author Topic: How to select default fill color?  (Read 304 times)

0 Members and 1 Guest are viewing this topic.

Nikolay

  • Hero Member
  • *****
  • Posts: 1031
    • UnmanagedVisio
How to select default fill color?
« on: December 11, 2020, 05:26:13 PM »
How do I select default fill color (programmatically?). This button's color "main" color I mean:


Surrogate

  • Hero Member
  • *****
  • Posts: 1166
    • ShapeSheet™ Knowledge Base
Re: How to select default fill color?
« Reply #1 on: December 12, 2020, 12:31:13 AM »
А ви с какой целью интересуетесь ?
Why you ask? (c)
« Last Edit: December 16, 2020, 03:51:23 AM by Surrogate »

Nikolay

  • Hero Member
  • *****
  • Posts: 1031
    • UnmanagedVisio
Re: How to select default fill color?
« Reply #2 on: December 12, 2020, 04:39:59 AM »
Because i think there may be a simple way to do that, but i may be just not aware of it..
recently had to do some eyedrop picking and copying hex colors, so thinking maybe some tool can be made to simplify this.

Croc

  • Sr. Member
  • ****
  • Posts: 277
    • Visioport
Re: How to select default fill color?
« Reply #3 on: December 12, 2020, 05:35:49 AM »
Perhaps this is stored in the registry. Look here or near

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Visio\Toolbars\MruColors]
"1359"=dword:fe8f95d9
"1404"=dword:ffc07000
"1385"=dword:feffffff   <-----------

Nikolay

  • Hero Member
  • *****
  • Posts: 1031
    • UnmanagedVisio
Re: How to select default fill color?
« Reply #4 on: December 12, 2020, 05:40:28 AM »
This is a bit too extreme...  :) Also does no look usable at runtime unfortunately. I was hoping for something like
Application.DefaultFillColor = color
« Last Edit: December 12, 2020, 05:44:49 AM by Nikolay »

Croc

  • Sr. Member
  • ****
  • Posts: 277
    • Visioport
Re: How to select default fill color?
« Reply #5 on: December 12, 2020, 07:09:08 AM »
GestureFormat doesn't work either?
Debug.Print ActiveDocument.GestureFormatSheet.Cells("Fillforegnd").ResultIU

Nikolay

  • Hero Member
  • *****
  • Posts: 1031
    • UnmanagedVisio
Re: How to select default fill color?
« Reply #6 on: December 12, 2020, 07:16:07 AM »
I have not tried, but this is something i hoped for! Sounds really promising. Will try.

-- update --
tried it, seems to have no effect unfortunately:

ActiveDocument.GestureFormatSheet.Cells("FillBkgnd")= 2
« Last Edit: December 12, 2020, 08:44:07 AM by Nikolay »