Macro recording fail

Started by AndrewJ, July 05, 2013, 03:36:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndrewJ

Hello!

I am trying to record a Macro in order to extract a code for creating a new data graphic (I want to automate the creation of little orange circles on top of process boxes in order for them to display process numbers).
However, when I start recording the macro, the data graphic options get greyed out.

1: What can I do to get around this?
2: How can I figure out the code to do this if I can't record a macro and then analyze the results? (I have already checked the SDK and couldn't find this)
3: Why is this happening? It's ridiculous!

Thanks in advance!
Andrew

AndrewJ

Just to give you guys an idea, this is what I am trying to record in a macro and avoid having to get the employees to do manually every single time they want to number a process box, especially since boxes might be added after the initial numbering is done.
My instructions were as follows...

1: CTRL click all processes that will be numbered
2: DATA tab > Data Graphics > Create New Data Graphic > New Item...
3: In the New Item window, select:
   Data Field: More Fields > Shape Data > Process Number (then click OK)
   Displayed as: Text
   Style: Circle callout
   Value Format: @+   
   Value Length: 10
4: Click OK
5: Under Default position, select:
   Horizontal: Left Edge
   Vertical: Top Edge
6: Click OK
7: Click "Yes" to apply this data graphic to selected shapes
Andrew


AndrewJ

Thank you,

But is there any help anyone is willing to offer me for this short of having to purchase and read an entire book?
Any help would be much appreciated, either in figuring out how to get Visio to stop greying out what I'm trying to record through a macro, by telling me how I can extract this code otherwise or by telling me what code to use if you could be that generous.

By the way, I am using Visio 2013.
Andrew

aledlund

You might start here ( the assumption is that you already have the visio sdk)

http://msdn.microsoft.com/en-us/library/office/ff766215.aspx

al

AndrewJ

Thank you.
But from what I am reading, it means that I have to already have created a data graphic?
That defeats the purpose of what I am trying to accomplish since you can simply select all shapes and chose the data graphic and it's done.
What I am trying to accomplish programmatically is creating that data graphic programmatically and integrating that code into a macro.
Can that be done?
Andrew