Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a Word Document from VFP 5
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Writing a Word Document from VFP 5
Miscellaneous
Thread ID:
00345890
Message ID:
00345890
Views:
38
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
Map
View

Click here to load this message in the networking platform