Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello to all
I need to change the formatting of text in a text field (font, size, and bold) when a button is clicked.
as you format text by code?
thanks
Andrea
Here is a macro example from APIGiude, it applies font to the active sheet:
sub Font
rem set active sheet to Arial 14 bold
set sp = ActiveDocument.ActiveSheet.GetProperties
set sfont = sp.SheetFont
sfont.FontName = "Arial"
sfont.Bold = true
sfont.Italic = false
sfont.Underline = false
sfont.PointSize1000 = 14000
ActiveDocument.ActiveSheet.SetFont sfont
end sub
You can do it using macros.
PFA
sub IncreaseFont
set obj = ActiveDocument.GetSheetObject("CH01")
set fnt = obj.GetFrameDef.Font
fnt.PointSize1000 = fnt.PointSize1000 + 1000
fnt.Bold = true
fnt.Italic = true
fnt.Underline = true
obj.SetFont fnt
end sub