Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read word document 1 page at a time
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01023431
Message ID:
01023437
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform