Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make the font style as bold in a button using vbscript?

Hi,

I have created a button in vbscript. I have entered the text, set the font color and set the button style. Please find the below script.

set prop = buttonObj.GetProperties

    prop.Text.v = "Reset"

    prop.Frame.ObjectID = "RESETBUTTON"

    prop.BtnStyle = 1

    prop.BkgColor.PrimaryCol.Col = RGB(239,239,239)

    prop.TextColor.PrimaryCol.Col = RGB(103,103,103)

Now I would like to make the text("Reset") in the button bold. Any help is appreciated.

Thanks in Advance!!!

1 Reply
tresesco
MVP
MVP

Try something like:

sub zz()

set bo = ActiveDocument.GetSheetObject("BU03")
fnt = bo.GetFrameDef.Font
fnt.Bold = true
bo.SetFont fnt

End Sub