Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Prevent pages from displaying/printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jamie - 21 Jul 2005 23:35 GMT
I'm not very VBA or SQL literate so I'm trying to figure a way to make this
form work.

I created a form out of a word document. It populates bookmarks and
references with data from a SQL database. The form is static. It allows up to
9 employees names, addresses, etc to display.

For example:
Laura Smith
15 Street Princeton, NY 08696
US citizen

Larry Kole
58 Rd New York, NY 90012
UK citizen

Jen  Reilly
40 Avenue Miami, FL 10012
FR citizen

So there are 3 employees that print per page. So I end up having 3 pages
each everytime.

My problem is that I don't always have 9 employees everytime. Sometimes I
may just have one which would
only need to print on page 1 or four employees which would print on 2 pages.

Is there any way to write a macro that will prevent pages from displaying
and printing depending the
the number of employees. So if there are 3 employees then page 1 will print.
If there are 4 to 6 employees then  page 2 will print.
If there are more than 6 employees pages 1 thru 3 will display and print.

Any suggestions? Many thanks Microsoft experts
Word Heretic - 22 Jul 2005 01:30 GMT
G'day "Jamie" <Jamie@discussions.microsoft.com>,

I would start with a blank template with some autotext for each
insertion chunk.

Then, for each group of three users add this autotext and populate it.
If you must use bookmarks to mark the spot, use this logic:

While PeopleLeftToReport > 0

  Insert autotext at end of doc
  Populate bookmarks with 3 people
  Delete bookmarks
  Decrement PeopleLeftToReport by 3
Wend

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Jamie reckoned:

>I'm not very VBA or SQL literate so I'm trying to figure a way to make this
>form work.
[quoted text clipped - 30 lines]
>
>Any suggestions? Many thanks Microsoft experts

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.