oWord=CreateObject("Word.Application")
WITH oWord
.Visible=.T. && para ver el documento enpantalla mietras se ejecuta
.Documents.Add && agrego una hoja
&& Seteos de Tipo de Hoja Carta
WITH oWord.ActiveDocument.PageSetup
*.LineNumbering.Active = 0
*.Orientation = 0
.TopMargin = 22
.BottomMargin = 22
.LeftMargin = 28
.RightMargin = 22
*.Gutter = 0
.HeaderDistance = 22
.FooterDistance = 22
.PageWidth = 612.1
.PageHeight = 792.1
*.FirstPageTray = 0
*.OtherPagesTray = 0
.SectionStart = 2
*.OddAndEvenPagesHeaderFooter = 0
*.DifferentFirstPageHeaderFooter = 0
*.VerticalAlignment = 0
*.SuppressEndnotes = 0
*.MirrorMargins = 0
*.TwoPagesOnOne = 0
*.GutterPos = 0
ENDWITH
oword.ActiveWindow.ActivePane.View.SeekView = 9
scan
.Selection.InsertAfter(aca va el campo de la tabla a imprimir en el word)
.Selection.Font.Name = "Courier New"
.Selection.Font.Size = 10
.Selection.Font.Underline = 0
.Selection.Font.Bold = 0
.Selection.Moveright
.Selection.TypeParagraph
endscan
endwith