Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best way to initalize Word97 from VFP6?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156542
Message ID:
00156693
Vues:
48
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform