> oRange = oWord.ActiveDocument.RANGE(0,0) && Start of document > WITH oRange.FIND > .TEXT ="!description!" > .MatchCase = .F. > .FORMAT = .F. > * what to replace it with > .Replacement.TEXT = lcdescription > .Replacement.FONT.Bold = .T. > .Replacement.ParagraphFormat.LeftIndent = 12 > * go! > lFound = .Execute( , , , , , , , , , , wdReplaceAll ) > ENDWITH >>
LOCAL loWord AS Word.Application loWord = CREATEOBJECT([Word.Application]) loWord.Visible = .t. loWord.Documents.Add() loWord.Selection.TypeText("!description!") TEXT TO lcdescription NOSHOW TEXTMERGE PRETEXT 1+2 This is first line This is second line This is thirth line ENDTEXT oRange = loWord.ActiveDocument.RANGE(0,0) && Start of document WITH oRange.FIND .TEXT ="!description!" .MatchCase = .F. .FORMAT = .F. * what to replace it with .Replacement.TEXT = lcdescription .Replacement.FONT.Bold = .T. .Replacement.ParagraphFormat.LeftIndent = 12 * go! lFound = .Execute( , , , , , , , , , , 2 ) ENDWITH