Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp6.0 Report Writer to Word document - FRX2Word
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Vfp6.0 Report Writer to Word document - FRX2Word
Miscellaneous
Thread ID:
00397237
Message ID:
00397237
Views:
42
Hi All,

I was able to download FRX2WORD, but I must admit that I don't understand how to make it work in my form.

Currently my form has a textbox in which the user can enter a four digit code indicating for which consignor they want to create a statement. After entering the code (i.e., "PREF"), the focus goes to a command button which has this code in the click event:

***begin code
store ThisForm.Sttxtcons.value to mcon
repo form strpconsignorstatement for stncwork.cons_no = ThisForm.Sttxtcons.value ;
to file &mcon ascii
oword = createobject("Word.application")
OWORD.VISIBLE = .T.
mcurdir = FULLPATH("&MCON")
myDocument = mcurdir + ".TXT"
oword.documents.open(mydocument)
InMargin = oword.InchesToPoints(0.5)
OWORD.activedocument.pagesetup.TopMargin = InMargin
OWORD.activedocument.pagesetup.BottomMargin = InMargin
OWORD.Selection.WholeStory
OWORD.selection.Font.Name = "Courier New"
OWORD.selection.Font.Size = 10
ThisForm.Sttxtcons.value = " "
ThisForm.Sttxtcons.SETFOCUS()
thisform.refresh
***end code

This creates the basic "statement", which can then be edited, if necessary. This is okay but not perfect.

I've read that FRX2WORD will take the .frx and create a "Word" doc with the formatting such as fonts, bold, etc.

Please excuse this most basic of questions, but after reading the documentation I'm still not sure what I need to do.

I've used the "form designer" to add the control to the form but I don't know how to make it function.

Any help would be appreciated.

TIA,

Jim Harvey
jharvey@netrax.net
Next
Reply
Map
View

Click here to load this message in the networking platform