FoxPro Club

. Visual FoxPro 9.0 Help Visual FoxPro
: 9146
Word ( OLE)

Word


 
: .   : Foxpro


Word ( OLE)

oWord = CreateObject("Word.Basic")
oWord = FileOpen ("C:\ \Test.doc") && must be exist!
oWord.Insert("-")
oWord.InsertPara
oWord.AppShow



"", -

"Viktor A. Rybakov" <rybak@nevsky.spb.su>

A., VFP , . . E-mail: apinigin@olainfarm.lv
 
    : (4.933)

Word ( OLE)
[+][?]

28.12.01 17:31:47

  ,        FOX -  ...

   :     WORD,    . 
             .
               .
         .
      ,      
.
  :

	dd=ddeinitiate("winword","System")&&  , WORD   dd - 
	
if 	dd<0 && 
	oword=create('word.application')&& WORD
	dd=ddeinitiate("winword","System")&&  
	else
	dd=ddeinitiate("winword","System")&&  
	endif
	if dd<0
	=messagebox('  MICROSOFT WORD')
	retu
	endif
ELSE
	RETU
ENDIF

	=ddeexecute(dd,'[Fileopen ".doc"]')&&  ,        
  .
	=ddeexecute(dd,'[paradown  ]')&&      

=ddeexecute(dd,'[TableInsertRow '+'"'+allt(str(- ))+'"'+"]" )&& ///* 
  , ,    ,     ,
  *////////

  ,  :
***********************************************************
sele dog3&&     
    ddeexecute()   , -    
go top
gggg=1&& - 
DO while !eof()
	SCATT memv
	=ddeexecute(dd,'[Insert "+'"'+allt(str(gggg))+'"'+"]')"&&   
	=ddeexecute(dd,'[NextCell]')&&  . 
	=ddeexecute(dd,'[Insert "+'"'+allt(m.pog_dat)+'"'+"]')"&& -     
	=ddeexecute(dd,'[NextCell]')
	=ddeexecute(dd,'[Insert "+'"'+allt(str(m.nominal,13,2))+'"'+"]')"
	=ddeexecute(dd,'[NextCell]')
	=ddeexecute(dd,'[Insert "+'"'+allt(str(m.nominal-m.disc_sum+m.sum_prc,13,2))+'"'+"]')"
	=ddeexecute(dd,'[NextCell]')
	=ddeexecute(dd,'[Insert "+'"'+allt(str(m.disc_veks,13,10))+'"'+"]')"
	=ddeexecute(dd,'[Linedown ]')
	=ddeexecute(dd,'[StartOfRow]')
	Skip
	gggg=gggg+1
ENDDO
****  **********
calc sum(nominal) to sum1
calc sum(nominal-disc_sum+sum_prc) to sum2
=ddeexecute(dd,'[EndOfRow]')
=ddeexecute(dd,'[PrevCell ]')
=ddeexecute(dd,'[PrevCell ]')
=ddeexecute(dd,'[Insert "+'"'+allt(str(sum1,13,2))+'"'+"]')"
=ddeexecute(dd,'[NextCell ]')
=ddeexecute(dd,'[Insert "+'"'+allt(str(sum2,13,2))+'"'+"]')"
************* ***********************************
,    , ,         
,
     .

 - 
[]



© 2000-2017 Fox Club 
- www.foxclub.ru
.