From: sourceAK on 19 Apr 2010 03:00 So... Long story short I'm trying to bypass the 65536 row problem in Excel by opening the file in Word and cutting it into smaller pieces. Then I can keep track of the smaller pieces naming the file (Filename1, filename2) and so on and open them in Excel, format them, remove all the junk I don't want and put all the junk I do want on a single sheet. When I open the document in Word I can jump to page 575 and cut up, move that in a new document and save the file name. The problem is I can't close the loop yet. If I could determine of the last page is greater than 575 I could say something like "Do until LastPageNumber < 575" and exit the loop. As it is now it just copies the last page over and over again. So how do I determine the last page in the document and stick it in a variable? Thanks!
From: Doug Robbins - Word MVP on 19 Apr 2010 03:14 Use ActiveDocument.BuiltInDocumentProperties(wdPropertyPages) -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "sourceAK" <sourceAK(a)discussions.microsoft.com> wrote in message news:4B6476B6-6468-4FDD-BAE0-A46ABD293FFF(a)microsoft.com... > So... Long story short I'm trying to bypass the 65536 row problem in Excel > by > opening the file in Word and cutting it into smaller pieces. > Then I can keep track of the smaller pieces naming the file (Filename1, > filename2) and so on and open them in Excel, format them, remove all the > junk > I don't want and put all the junk I do want on a single sheet. > > When I open the document in Word I can jump to page 575 and cut up, move > that in a new document and save the file name. > The problem is I can't close the loop yet. If I could determine of the > last > page is greater than 575 I could say something like "Do until > LastPageNumber > < 575" and exit the loop. > As it is now it just copies the last page over and over again. > > So how do I determine the last page in the document and stick it in a > variable? > > > Thanks! > >
|
Pages: 1 Prev: I want to start a footer on the third page of a document. How? Next: find and delete text box |