Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Word macro to code
Message
 
À
07/10/2008 17:18:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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:
01353479
Vues:
27
>>>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.
>>
>
>
>Boris,
>You have done the heavy lifting a little touch:)
>
>
>#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
>     .Execute()
>EndWith
>oWord.Visible = .t. && if sending to printer maybe .f. and quit?
>
Cetin



:-)))
Maybe, but I'm almost asleep :-)
I prefer to Merge all to new dopcument and then show it to the user. Then let He/She decides what to do with it :-) Print/Save/not save at all ....
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