Link to home
Start Free TrialLog in
Avatar of SweetingA
SweetingA

asked on

Update font size in labels and text boxes in powerpoint vba

Does anyine know how to easily update font characteristics in access vba for text boxes or labels that are already created.

Also in what event they should be te triggered.

All help most welcome.
Avatar of oleggold
oleggold
Flag of United States of America image

try to record macro,then tools-> developer tools - edit the macro
fin msoffice 2010 ,developer tab (make sure You add on the ribbon,macros -> command ->create (new command))
Avatar of SweetingA
SweetingA

ASKER

I can't record a macro because the font tools are greyed out when i click on toolbox items (i.e. textbox, command button or label) - thats why i need to know the vba code.

I am using MSOffice 2003

Regards
Avatar of John Wilson
PowerPoint or Access?

Sounds like you have added a textbox from the control toolbox. Is there a good reason for this because otherwise a normal textbox will be easier?

What font characteristics need to change and when?
Its powerpoint, in access i have no problems but i have never used powerpoint vb

Yes i used the toolbox because i want the user to input something

its not so much the syyntax i am struggling with its the name of the event/function to trigger the change, is there a list of available functions?

Regards
I have tried things like this but i can't seem to trigger the event

When i try the same code in an on click event (which is no use for me) it tells me i can't use a textframe for this type of object

Private Sub SlideShowBegin(ByVal Wn As SlideShowWindow)
    ActivePresentation.Slides(42).Shapes("TextBox1").TextFrame.TextRange.Font.Size = 28
End Sub
Solved

            ActivePresentation.Slides(42).Shapes("TextBox1").OLEFormat.Object.Font.Size = 28

regards
ok to earn the points tell me how to change the above code to change the font colour
ASKER CERTIFIED SOLUTION
Avatar of John Wilson
John Wilson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial