this is to create a textbox shape in an excel sheet and put some text in it, and format part of the text.
Dim wbk1 As Excel.Workbook
Dim sht1 As Excel.Worksheet
Set wbk1 = Workbooks.Add
Dim m As Shape
Set sht1 = wbk1.Worksheets(1)
Set m = sht1.Shapes.AddTextbox(1, 0, 0, 100, 100)
m.TextFrame.Characters.Text = "First Line" & Chr(10) & "Second Line"
m.TextFrame.Characters(4, 4).Font.Bold = 1
var xls = new ActiveXObject ( "Excel.Application" );
var newBook = xls.Workbooks.Add;
ws1 = newBook.Worksheets(1);
shp1 = ws1.Shapes.Addtextbox(1,0,0,100,100);
sh1.TextFrame.Characters.Text = "First Line" +"\n"+ "Second Line";
The last line in the above code is not working.(it says: object does not support this property")
Thanks in advance.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread