Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Word macro to code
Message
De
07/10/2008 17:06:58
 
 
À
07/10/2008 17:04:49
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01353435
Message ID:
01353466
Vues:
33
>For being toooooooo sleepy, you're doing great! It compiled fine...then at...
>
>oWord.Documents.Open("C:\byteworks\gmr\lunches\GUESTLABELS.DOC")
>
>I got:
>
>Program Error
>OWord is not an object
>
>Thank you SO much!
>Martha

Sure you got this :-)))
I am the dum....s here:
#define wdSendToPrinter        1
#define wdDefaultFirstRecord   1
#define wdDefaultLastRecord  -16

LOCAL oWord

oWord = CREATEOBJECT([Word.Application]) && W/o this nothing can work, even VFP9 :-))))
oWord.Documents.Open("C:\byteworks\gmr\lunches\GUESTLABELS.DOC")
With oWord.ActiveDocument.MailMerge
     .Destination        = wdSendToPrinter
     .SuppressBlankLines = .t.
     With .DataSource
          .FirstRecord = wdDefaultFirstRecord
          .LastRecord = wdDefaultLastRecord
      EndWith
     .Execute()
EndWith
oWord.Visible = .t.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform