Clear all #Define wdWord9TableBehavior 1 #Define wdAutoFitWindow 2 #Define wdStory 6 #Define wdCollapseEnd 0 #Define wdCellAlignVerticalCenter 1 #Define CR chr(13) lcPhotoPath = _samples+'\data\graphics\' Use (_samples+'\data\employee') oWord = createobject('Word.Application') With oWord oDocument = .Documents.Add With oDocument.Application.Selection With oDocument.tables.add( .Range, 1, 7) .borders.InsideLineStyle = .F. .borders.OutsideLineStyle = .F. For ix=1 to 6 **** Add captions ***** .Cell(.Rows.Count,ix).Range.InsertAfter( field(ix) ) Endfor .Cell(.Rows.Count,7).Range.InsertAfter( 'Photo' ) Endwith .EndKey(wdStory) Endwith Scan With oDocument.Application.Selection With oDocument.tables.add( .Range, 1, 7) .borders.InsideLineStyle = .F. .borders.OutsideLineStyle = .F. For ix=1 to 6 **** Add values to the different cells ***** .Cell(.Rows.Count,ix).Range.InsertAfter( eval(field(ix)) ) Endfor lcPhoto = lcPhotoPath+left(last_name,4)+left(first_name,4)+'.GIF' If file(lcPhoto) && Add photo if any <B> oDocument.InlineShapes.AddPicture(; lcPhoto, .T., .T.,.Cell(.Rows.Count,ix).Range) </B> Endif .Rows(.Rows.Count).Cells.VerticalAlignment = wdCellAlignVerticalCenter Endwith .EndKey(wdStory) Endwith Endscan .Visible = .t. EndwithHelp filename depends on version. It's something like :