Hi Tony,
Thank you for the help.
The barnacles on my macro skills would these days likely create more crashes than feature
enhancements/solutions beyond the conceptual <g> and I appreciate those of you with current skills in that area, as demonstrated
here frequently, from coming up with working solutions.
=============
<<"Tony Jollans" <My forename at my surname dot com> wrote in message Hi Chaps,
This isn't as easy as you might think. Well, it isn't so much that it's
difficult to actually do as it seems impossible to do it neatly through the
menus.
I don't believe it is possible (unless you use RibbonX to customize the
ribbon, and even then I'm not sure) to add the Custom Depth option to the
Ribbon popup/dropdown/gallery/whatever it's called.
The next best thing is to add it to the right click menu on the shape.
However all my attempts to add the Microsoft control to this have failed.
Adding the control is easy enough but it doesn't show up when you right
click the shape.
Further, all my attempts to add any type of control at all that takes input
have failed in the same way. The controls do get added to the menu and if
you pop up the menu (through code) when a shape is not selected they even
'work' (but not on any shape) but they do not appear properly when you right
click a shape.
So, what I have done is to add a simple button to the right click menu and
made it bring up an Input Box. I then pass the input from there to the
(otherwise unavailable through the UI) original built-in control.
I'm sorry to say that even this is not really good because if you type
nonsense you get the error message but must then right click again for
another try.
Maybe I'm being particularly thick about something and someone better and
bolder can come along with an improvement. Meanwhile ...
Add this code to your Normal Template. If you normally use a different
global template, that would be better, and if you do I'm sure you know how
to adapt the code. If, on the other hand, you know nothing of macros, see
http://www.gmayor.com/installing_macro.htm
Sub OneTimeSetUp()
With CommandBars("Shapes").Controls.Add(Type:=msoControlButton)
.Caption = "Custom Depth"
.OnAction = "MyCustomDepth"
.FaceId = 1379
End With
End Sub
Sub MyCustomDepth()
On Error GoTo Done
NewCustomDepth = InputBox("Please Enter New Custom Depth", _
"3-D Setting: Custom Depth", _
CommandBars.FindControl(ID:=1572).Text)
If NewCustomDepth <> "" Then
CommandBars.FindControl(ID:=1572).Text = NewCustomDepth
End If
Done: End Sub
Run the OneTimeSetUp macro once to add the extra control. You can then throw
it away. But keep the MyCustomDepth macro because that is the one that runs
when you click the new button.
The extra option on the Shapes menu will appear even when it's not valid
but the error trap should mean that nothing happens if you click on it.
[OK, Bob? <g>]
--
Enjoy,
Tony >>
--
Bob Buckland ?
MS Office Stuff MVP
*Courtesy is not expensive and can pay big dividends*