Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Word macro to code
Message
 
To
07/10/2008 17:18:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01353435
Message ID:
01353479
Views:
28
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform