msword

msword

Postby kajot » Sun Jun 28, 2009 5:42 pm

how may I change size of font in line 2

TRY
oWord := GetActiveObject( "Word.Application" )
CATCH
TRY
oWord := CreateObject( "Word.Application" )
CATCH
Alert( "Blad! MS Word nie dostepny. [" + Ole2TxtError()+ "]" )
break
END
END

// create a new, empty Word document
oDocument := oWord:documents:add()

// get the text selection object
oText := oWord:selection()

// select font name, size and attribute
oText:Font:Name := "Arial CE"
oText:Font:Size := 12
oText:Font:Bold := .f.

// assign some text
oText:Text := "TEST 1" + CRLF // line 1
oText:Text += "TEST 2" + CRLF // line 2


best regards
kajot
best regards
kajot
User avatar
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha, nageswaragunupudi and 43 guests