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:
00156698
Vues:
53
Juan,

If that code is clipped you forgot to set oWordDoc = to the return value of the Documents.Add() method.

According to the VBAWord8 file the erroring line looks ok. What if you move another line above it? What is the error you get? Also InchesToPoints() is a method of your oWord object so you need: .TopMargin = oWord.InchesToPoints( 1 ).

>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)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform