How to make Visual Basic Macro only make changes to certain pages

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

menander

Thread Starter
Joined
Jan 21, 2012
Messages
15
Hi,

I have several macros I've written for Word VB, which all work fine. But I would like to make them only affect all pages after page 3 in my documents, so that these first three pages are never affected by all the operations carried out in the macros. So, I want Word to only look at pages 4 up to the document's last page(this number varies). How can I do this be, please?

Thanks,
Kay
 
Joined
Jun 8, 2001
Messages
2,583
The current page number is :
Pagnr = Selection.Information(wdActiveEndPageNumber)

Total number of pages:
TotPages = ThisDocument.ComputeStatistics(wdStatisticPages)

I'm not a word vba'er so I can't be much help past that. The next question would be how to GoTo that page? If you can GoTo nextpage until you get to 4 but you could also loop count and get there? Maybe others can provide better info, this might be enough info to 'Google' intellegently.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top