Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word DOC to text and images
Message
De
30/03/2006 07:39:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01108271
Message ID:
01109109
Vues:
29
Hi Yuri

I managed to work through and extend your code sample to extract both the text and images that I needed :) Thanks very much.



>Hi Jos,
>
>There is no object like "page" in the Word document. To deal with your project, the following may help:
>
>oWord = Getobject(,"Word.Application")
>lnPageCount=oWord.ActiveDocument.ComputeStatistics(2)
>with oWord.Selection
>	FOR pnPage=1 TO lnPageCount
>		.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).copy
>
>	.........
>	
>	ENDFOR
>ENDWITH
>
>
>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform