I'm attempting to create a textbox at the top of the slide in powerpoint using VBA (so much about that sentence makes me sad). A lot of the examples I see online don't seem like they use "Option explicit" macro practices because some of the variables I see in examples aren't declared or expressly typed.
Anyways, at this point I just need to generate a textbox, ideally get some kind of name for this text box so I could do things with it, and then modify the parameters of this textbox, like font size. Eventually I'm going to make it so users can input the string values and create their own sheets, using this as a template.
Currently I'm working with this. myDocument is the slide, and title is a string that I've already assigned. This would be absolutely what I need but I can't change anything else about it, like font size.
myDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=0, Top:=10, Width:=200, Height:=50).TextFrame.TextRange.Text = title
If I wanted to add .Font.Size = 18 to the attributes, I can't seem to find a way that has worked so far.
I've seen a few examples where they use a with - end with statement and set individual properties, but when I tried to create a shape and then modify individual attributes, I'd get errors(probably because shapes don't have a font attribute). Here's a page I've been trying to use as a guideline but it hasn't helped much
http://www.ozgrid.com/forum/showthread.php?t=18611
I'm pretty lost on how to use text box objects, how to keep track of them or assign them a name, pretty much everything about them. This is entirely new territory for me. Any help would be immensely appreciated