FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour msword
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
msword
Posted: Sun Jun 28, 2009 05: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

Continue the discussion