I am working on drawing a series of text boxes into a publisher file (via Publisher shapes) from an Excel sub (sample code below).
The problem I am running into is that I can't seem to declare a Font and reuse it for later, so I have to change the font, text size, color, bold, and alignment individually for each text box.
My question is: Is there a way to save a font as a variable, and set all text properties of a shape by simply assigning the font variable? How do I do this?
'Values
Dim ptab0v, ptab1v, ptab2v, ptab3v, ptab4v, ptab5v, ptab6v, ptab7v, ptab8v, ptab9v, ptab10v, ptab11v As String
'Shapes
Dim ptab0s, ptab1s, ptab2s, ptab3s, ptab4s, ptab5s, ptab6s, ptab7s, ptab8s, ptab9s, ptab10s, ptab11s As Publisher.Shape
ptab0v = "filler"
Set ptab0s = appPub.ActiveDocument.Pages(5).Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=conv * 0.82, Top:=conv * 2.77, Width:=conv * 1.43, Height:=conv * 0.29)
ptab0s.TextFrame.TextRange.Text = ptab0v
'---I WANT THE FOLLOWING LINES TO BE SIMPLIFIED TO ONE LINE---
ptab0s.TextFrame.TextRange.Font.Name = "Monsterrat"
ptab0s.TextFrame.TextRange.Font.Size = 14
ptab0s.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 255)
ptab0s.TextFrame.TextRange.Font.Bold = msoTrue
ptab0s.TextFrame.TextRange.ParagraphFormat.Alignment = pbParagraphAlignmentCenter