Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read word document 1 page at a time
Message
De
15/06/2005 08:48:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01023431
Message ID:
01023444
Vues:
20
hi,
what about vfp8.
thanks
>Something like this:
>
>=YSelectOnePage(4)  && paste text from page 4 into the text file c:\hi.txt
>
>Procedure YSelectOnePage
>lParameter pnPage
>oWord = Getobject(,"Word.Application")
>lnPageCount=oWord.ActiveDocument.ComputeStatistics(2)
>with oWord.Selection
>	if lnPageCount<pnPage
>		* error message go here
>	else
>		.GoTo(,,,pnPage)
>		lnStart=.Range.Start
>		if lnPageCount >pnPage
>			.GoToNext(1)
>			lnEnd=.Range.Start - 1
>		else
>			.Endkey(6)
>			lnEnd=.Range.Start
>		endif
>		oWord.Activedocument.Range(lnStart,lnEnd).Select
>		
>                =strtofile(_cliptext,"c:\hi.txt")
>				
>	endif
>endwith
>
>oWord=.NULL.
>release oWord
>
>
>
>>I need to read a word document one page at a time
>>
>>How can I retrieve a word page into the clipboard so I can paste it into another application?
>>
>>
>>Thanks
>>
>>
>>Peter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform