Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageBreak Help
Message
From
23/04/2002 10:59:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
PageBreak Help
Miscellaneous
Thread ID:
00648162
Message ID:
00648162
Views:
38
Hi all,

I have to export to the Word but I need someone wiiling to help me on pagebreak each time the process changes the employee number as with the following codes :

nOLEerror=0
on error nOLEerror=error()
oWord=CreateObject('Word.Application')
on error
if nOLEerror=0
nTop=0
nLeft=0
wait 'Opening Word' window nowait
with oWord
.visible=.T.
.Documents.Add
select CTEMP6
go top
cEmpno=''
scan
if cEmpno#EMPNO
if !empty(cEmpno) && New Page - do header
.Selection.InsertBreak() &&* put in code for pagebreak
endif
with .Selection
.font.name='arial'
.font.size=14
.font.bold=.t.
.TypeText("TITLE ABC ")
ENDWITH
.Selection.TypeText('EMPNO :')+empno
.Selection.TypeText(MEMO+chr(13))
endscan
endwith
else
=messagebox('Unable to create Word File',0+48+0,'EXPORT ERROR')
endif
if used('ctemp6')
USE IN ctemp6
endif

Please correct my codes if necessary or guide me ?

TIA
PP
Next
Reply
Map
View

Click here to load this message in the networking platform