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