Novice Challenge 9: I Need a Break

Office Programs Required

Microsoft Word 2007

Goldfish Awarded

15

Deadline for Submission

Friday, May 1, 2009 (8:00 AM Pacific Daylight Time)

Files Required

NoviceChallenge09.docm in the OfficePalooza Challenge Pack.

Challenge 9 – you’ve almost reached the end of the OfficePalooza challenges, at least in the Novice division. After working your way through the first eight challenges you’re probably ready for a break. Well, this challenge is all about breaks – but probably not the type you were hoping for.

In this challenge you’re presented with a document with pages separated by manual page breaks. In other words, the pages didn’t break because the text reached the end of the page – we purposely put page breaks in to divide the sections of the document. But now we’ve changed our minds.

You task is to remove the manual page breaks from the document. But before you do that, we need to know how many pages you started with. And when you’re done, we want to know how many pages we’re left with. What this means is that, to successfully complete this challenge, you need to do the following:

1. Display a message box showing the number of pages in the document. Something like this:

Novice Challenge 9 

2. Find all the manual page breaks in the document and remove them. (Hint: It might be a good idea to remove the paragraph marker following the manual page break, too.)

3. Display a message box showing the number of pages that are left after the page breaks are removed.

When you open the Visual Basic editor (which you can do by pressing Alt+F11), there should already be a window open with the subroutine FindMyBreaks showing. Insert your code into this subroutine. (If you don’t see this subroutine, double-click on ThisDocument in the Project pane on the left under VBAProject (NoviceChallenge09).) Do not create any other subroutines – all your code should go in here.

Important: Do not add code to save the document.

Submitting Your Entry

The OfficePalooza sweepstakes is over, but you’re welcome to try the challenges and learn on your own. Good luck!