Failing code has an inline comment beginning with <====
Form.Method
------------
*-- let us assume that the below are valid objects
oWord = CreateObject("Word.Application")
oWord.Documents.Add()
*************************
FUNCTION WordDocumentSetup( oWord, oWordDoc )
*************************
WITH oWordDoc.PageSetup
.LineNumbering.Active = .F. && <==== Program fails right here
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(1)
.BottomMargin = InchesToPoints(.50)
.LeftMargin = InchesToPoints(1.00)
.RightMargin = InchesToPoints(1.00)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(.80)
.FooterDistance = InchesToPoints(.50)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = .F.
.DifferentFirstPageHeaderFooter = .T.
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = .F.
.MirrorMargins = .F.
PUBLIC m.gnWorkArea
m.gnWorkArea = .PageWidth - ( .LeftMargin + .RightMargin )
ENDWITH