Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a fields from one record into Word
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00449272
Message ID:
00450008
Views:
38
>I don't think you need a range object here. Try the following:
oWord=CREATEOBJECT('word.application')
>oDocument = oWord.documents.OPEN('c:\qcf19.doc')
>oWord.VISIBLE=.T.
>oSelection = oWord.Selection
>#DEFINE wdLine 5
>
>with oSelection
> .MoveDown(wdLine,1)
> .TypeParagraph
> .TypeParagraph
> .MoveUp(wdLine,2)
> .InsertDateTime("MMMM d, yyyy",.f.)
> .TypeParagraph
> .Typeparagraph
> .TypeText (l_address) && Macro expansion not necessary here
>endwith
-Rick
>

Works :)

Thanks to you both.
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Previous
Reply
Map
View

Click here to load this message in the networking platform