Sub paragrComp
   Dim tm as Object
	Set tm = CreateObject("TextMaker.Application")
	Dim i,dc, nPar(1 To 2), iPar, vPar as Integer
	Dim erg as Integer
	Dim txt(1 to 2) as String
	tm.Application.Visible = True
	tm.Application.Activate
	For dc = 1 to 2
		txt(dc) = tm.Documents(dc).Name
		nPar(dc) = tm.Documents(dc).Paragraphs.Count
	Next dc
	vPar = nPar(2)
	If nPar(1) < vPar Then
		vPar = nPar(1)
	End If
	For iPar = 1 to vPar
		For dc = 1 To 2
			tm.Documents(dc).Activate
			With tm.Documents(dc)
				.Selection.SetRange .Paragraphs(iPar).Range.Start, .Paragraphs(iPar).Range.End
			End With
			txt(dc) = tm.Documents(dc).Selection.Text
		Next
		erg = StrComp(txt(1),txt(2))
		If erg <> 0 Then
			tm.Documents(1).Selection.Cut
			tm.Documents(1).Selection.TypeText txt(2)
		End If
	Next iPar

	tm.Documents(1).Activate
	Set tm = Nothing
End Sub