Message 1 of 5

Not applicable
05-03-2011
05:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I've got a really simple problem, I just can't figure it out.
I'm trying to change the font size of the text in a text box using the following code.
======================
Sub TextHeightTest()
Dim odoc As PartDocument
Dim textbox As textbox
Dim fontsize As Double
Set odoc = ThisApplication.ActiveDocument
Set textbox = odoc.ComponentDefinition.Sketches.Item(1).TextBoxes.Item(1)
fontsize = 0.35
textbox.Style.fontsize = fontsize
End Sub
======================
but I keep getting error message saying that "Method 'FontSize' of object 'TextStyle' failed".
Has anyone got any suggestions?
Thanks and Regards
Solved! Go to Solution.