Can't Define a New Style

Started by Visio Guy, May 17, 2010, 08:28:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

I wonder if anybody else has run into this problem. I have installed on my system:


  • Wiindows 7, 64-bit.
  • Visio 2003
  • Visio 2010

I run both Visios in Developer Mode (of course!) and cannot add a new style. The  {New Style} item is not available in the drop-down list, as shown in the screenshot below.

If I programmatically add a style:

Call Visio.ActiveDocument.Styles.Add("Some New Style","None",true,true,true)

the style is added, but I can't change any attributes via the Define Styles dialog. I get an "A Name is Required" error (also attached) when I hit the "Change" button, and nothing gets changed.

Changing the Style via it's ShapeSheet doesn't seem to actually update the style at all. When I apply the style, it still has the old, unchangeable attributes.

Anybody else run into this?



For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

soun

I'm having the exact same problem, on Vista x64 with both Visio 2003 and 2007. The difference is that if I add the style programatically, I can use it normally and update/change it without issue.

Have you had any luck in finding out what causes this? I tried a complete uninstall and reinstall with no change.

soun

I just came across this issue again on a clean format many months later, so I began to suspect it's some software I'm installing that's doing it, and I have found one cause of this error. Since it has been so long I assume you've already found your own workaround, so this is mostly to help anyone finding this page when searching for the error themselves.

I am using an application called DisplayFusion, which amongst other things extends your taskbar to other monitors. To replicate the Visio problem you described above, I just need to install the software, and I have the problem. However, by unchecking "Enable global application hooks" in DisplayFusion Settings > Troubleshooting, the problem immediately goes away and I can once again create styles in Visio. Toggling this on/off immediately makes the problem come back or go away, so it looks like it is caused by some in-memory interference rather than a file or registry setting, which was my first suspicion.

While this software is certainly not the only cause of the error, I hope this information helps someone track down the cause of the problem on their own machine.

Some search strings that may help someone find this post:

A name is required. Enter a name.
Visio Styles
Cannot create a new style
Can't create a new style

Visio Guy

Hi Soun,

Thanks for checking in. No, I hadn't found out what was wrong at all, so your post is great!
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Visio Guy

There is a workaround.

1. Open the Drawing Explorer from the Developer tab.
2. Expand the Styles node and select the style you want to edit.
3. Right-click the style item and choose Show ShapeSheet.
4. Make changes directly in the style's ShapeSheet.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

JuneTheSecond

I think you should right click on the style of drawing explorer,
not on the new style.
Best Regards,

Junichi Yoda
http://june.minibird.jp/