Macro

D

dah

Hi,

I have created a form that will be filled out on the PC and it ha
close to 20 pages. Not all the pages will be utilized depending on th
order. How do I write a macro that will print only the pages tha
actually contain data?

Thanks,
De
 
A

Alex Ivanov

I'd suggest to save each of your pages (or logical units) as separate
autotext entries in the template and leaving the body of the template blank,
except header/footer or other persistent information. When a user creates a
new document based on the template, show a userform with check boxes which
pages to include. Then insert the autotext entries into the document
according to made selections.
 
D

dah

That sounds like it might work but how exactly would I go about creatin
the separate autotext entries. I currently have each page as a sectio
break and the text on each page is associated with a bookmark.

Thanks,
De
 
A

Alex Ivanov

Select the entire section, including section breaks, if you wish.
Click Insert/Autotext/Autotext from menu bar.
Select the rigth template from the look in combo.
Enter a meaningful short name into the text box and click Add.
Then delete the selected text.

Here's an example. Examine the FillDoc macro.
http://www.aleksoft.net/samples/sections.dot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top