Thread: [Solved] Macro to insert shape
View Single Post
 
Old 03-11-2022, 02:34 PM
radioMic radioMic is offline Windows 10 Office 2021
Novice
 
Join Date: Mar 2022
Posts: 7
radioMic is on a distinguished road
Default Macro to insert shape

I have played with VBA in Excel and, got alit okay with it but knowing what I don’t know, I know that I need to ask for help.

I have skulked around the interwebs and found how to insert a shape in the current document -
ActiveDocument.Shapes.AddShape msoFreeForm Left, Top, 300, 30
What I would like to ask is how to adjust the code to insert the shape at the current cursor location within the document? Thinking that would eliminate the Left, Top coordinates ( ! yay ).

Now for the fun stuff... how do I change the fill and line colors of the shape?

And here's the tricky stuff... how do I add a 2x1 table inside of the shape just inserted, adjust the width of and vertically center align ( text for ) the first cell.

Probably one of the more odd asks, but want to say thanks in advance for the help.
Reply With Quote