Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to initalize Word97 from VFP6?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00156542
Message ID:
00156693
Views:
55
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
Juan L. Romero
gcandela@javanet.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform