Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Merging VFP data with MS Word
Message
From
20/10/1998 10:33:01
 
 
To
20/10/1998 10:13:31
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00148469
Message ID:
00148488
Views:
24
>In my VFP 5.0a application I have a feature that exports the data to a FoxPro 2.x format so that the user can merge the data with MS Word. I have used the FOX2X file type since Word (especially earlier versions) does not recognize A VFP file. Some users can do the merge just fine but we are getting more and more users who do not have the dBase/FoxPro data access drivers on their system.
>
>Does anyone have any suggestions on what to do here? Is there a good and/or easy place to get the dBase/FoxPro data access drivers for these users?
>
>Many thanks in advance,
>
>Phyllis



Two ways to do, one simple but not good way is to convert the dBF file back to
Dbase III+, DBase IV compatible Dbf! This type of Dbf must availble in Excel!!

Another method to Create a Word Object and write the needed field information to word with word macros...
For more deatils or examples on Create Word Object, you can:
- See VFP Solution Sample Help!
- Download some Good tools in File Section such as FoxDoc to study!
- See the Word Macros Help....

Here give a easy begin to you...
Public oFax
	oFax = CreateObject('Word.Basic')
	oFax.Apprestore()
	oFax.Appmaximize()
	oFax.FileNew()
	oFax.ViewZoomPageWidth()
	oFax.CenterPara()
	oFax.fontsize(24)
	oFax.Bold(1)
	oFax.insert([My Company Name Here]+chr(13))
	oFax.Bold(0)
	oFax.fontsize(10)
	oFax.insert([My Company Address Here]+chr(13))
	oFax.insert([Tel : Phone Number  Fax : Fax Number  Email : Email Address]+chr(13))
	oFax.ResetPara()
	oFax.insert(Chr(13))
	oFax.tableinserttable(,1,1)
	oFax.BorderLineStyle(3)
	oFax.BorderOutside(1)
	oFax.BorderLineStyle(1)
	oFax.StartOfLine()
	oFax.Bold(1)
	oFax.insert("To : ")
	oFax.Bold(0)
	oFax.insert(ALLTRIM(QCust.Cust_Name)+chr(9)+"Date: ")
	oFax.insertField('Time \@ "MMMM D, YYYY."')
	oFax.FormatTabs("10.48", 0)
	oFax.insert(chr(13))
	oFax.Bold(1)
	oFax.insert("Attn : ")
	oFax.Bold(0)
	oFax.insert(ALLTRIM(QCUST.PERSON_CTA))
	oFax.FormatTabs("1.25", 0)
	oFax.insert(chr(13))
	oFax.insert(Chr(9) + ALLTRIM(QCUST.FAX) +", " + ALLTRIM(QCUST.COUNTRY))
	oFax.insert(chr(13))
	oFax.Bold(1)
	oFax.insert("From : ")
	oFax.Bold(0)
	oFax.insert(ALLTRIM(Jones Kwok/Joseph Tan]) + CHR(9))
	oFax.Bold(1)
	oFax.insert("Ref # : ")
	oFax.Bold(0)
	oFax.insert(FAXNAME)
	oFax.insertField("FILENAME \* UPPER \* MERGEFORMAT")
	oFax.StartOfLine()
	oFax.insertPara()
	oFax.linedown(2)
	oFax.insert(chr(13) + "Dear ")
Surely you'll found that use Word Macros can help a lot but Word Macros can't easy to build a good drawing such as square or circle! You need to make an alternative way to do!!

>^.^< Good Luck!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform