Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word DOC to text and images
Message
From
30/03/2006 07:39:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01108271
Message ID:
01109109
Views:
30
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform