General information
Category:
Coding, syntax & commands
Title:
Writing a Word Document from VFP 5
Hi All
I'm having trouble creating a word document from within VFP 5
For this example I have a table with 3 records on it - The following code works but the records are listed in 3 2 1 order and not the order I want them. Does anyone have any ideas as to what I'm doing wrong
select (cAlias)
go top
nLine = 0
do while !eof()
.Selection.Font.Size = 9
.Selection.HomeKey(wdLine)
cLit = chr(9)+invto+chr(9)
cLit = cLit+stockcode+chr(9)
cLit = cLit+alltrim(str(actqty))+chr(9)
nLine = nLine+1
cLit = cLit+alltrim(str(nLine))+alltrim(descript)+chr(9)
cLit = cLit+'£'+alltrim(str(totalprice,8,2))+chr(9)
cLit = cLit+alltrim(str(percent))+chr(9)+chr(9)
cLit = cLit+alltrim(str(custprice,8,2))+chr(13)
.Selection.TypeText(cLit)
.Selection.TypeParagraph
select (cAlias)
skip
enddo
Many Thanks
Derek...
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only