Insert "more controls" in excel developer tab sometimes doesn't work.
Posted on 2016-09-16
Excel developer tab allows me to "insert" worksheet objects like command boxes and buttons. The "insert" submenu has 11 "standard" Active X Control icons and a 12th icon that reveals dozens of "more controls".
Many of those extra controls (like ButtonBar Class) work just fine, but many, such as "Microsoft Outlook Body Control" result in an error message: "can't insert object". How can I get those to also work?
Here are more details about my specific needs, but I will award points for even small progress towards my final goal.
---- details -----
Excel's standard textbox has properties like mybox.TextEffect.Text which contain unformatted version of the textbox contents.
Today's question is how to give my Excel worksheet a "better textbox" where vba can easily access the formatted text. In other words a vba property like mybox.HTMLText or .HTMLBody.
(My final goal is to send an outlook email, but I already thoroughly understand those steps. (something like myMailItem.HTMLBody = myVbaMagic.HtmlText)
So can anybody tell me how to use Excel Developers tab's "more controls" to create a control that has an HTML property. My first guess was to try an Microsoft Outlook Body Control, but that does not seem to work. I am not wedded to the Outlook Body Control -- ANY control with an HTMLProperty would probably work. For instance, I note that MSForms library contains classes like htmltext and htmltextarea. If I could get those to appear on my worksheet, they might work just as well.
My current attempt using Excel's Developer Tab goes like this
1) Controls Group > Insert > Active X submenu > More Controls (which is at the bottom right of the submenu)
2) scroll down to Microsoft Outlook Body Control
3) click OK then draw a box on my spreadsheet.
When I release the mouse, I get a message "cannot insert control". How do I get around that?
My workbook already has a reference to Microsoft Outlook Objects, so I don't think that is the problem