Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open DBF into Word Table
Message
From
30/12/2005 08:48:01
 
 
To
30/12/2005 05:28:13
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01081960
Message ID:
01081975
Views:
7
>Dear Experts
>
>Is it possible to copy a DBF to word table?
>After applying commands
>Word document should automatically open with table
>Alongwith column lines.
>

There are a couple of ways to do this. The fastest is probably to copy the DBF to a CSV file and then open that file in Word and convert it to a table. Something like this (totally untested):
USE YourTable
COPY TO YourTable TYPE CSV

oWord = CREATEOBJECT("Word.Application")

* Add the complete path in the next line
oDoc = oWord.Documents.Open("YourTable.CSV")
oRange = oDoc.Range()

oRange.ConvertToTable(",")

oWord.Visible = .T.
Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform