So if the user needs more than 10 line items, I want them
to push a button at the bottom of the page "Add additional
page". That button would copy the top user information
and then have 10 new clear blanks. I don't mind if I copy
the whole first sheet, then clear out the 10 order entry
lines. How do I do this? Thanks for any assistance.
You don't want to copy the text on sbsequent pages, you merely want to
display it. Proceed as follows
1. In the Layout tab of the Page Setup dialog, check the "Disfferent first
page" checkbox.
2. Select the whole of the area that you want to show on subsequent pages,
then go to Insert, Bookmark, and create a bookmark that marks this area.
3. Temporarily create a second page, and go to the header of that page.
Insert a REF field into the header that points to the bookmark you just
created. The text will be reflected in the page header.
4. Delete the page break that created the second page.
What will now happen is that when you insert more then 10 line items, the
second page is created, complete with the user information at the top of the
page, without you having to explictly insert it on each page.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
"Ramona" <anon...@discussions.microsoft.com> wrote in message
news:22b701c47017$4c71c660$a401...@phx.gbl...
You could do this with the following steps:
Make sure your blank form template is saved as a template (".dot"). In your
blank form template, copy everything that you want to be added to an
additional page when the user clicks the button, including the 10 blanks.
Ctrl+End to go to the end of the form. Insert>Break>Page Break. Paste.
Select everything including the page break through the last blank on the
second page. Insert>AutoText>Autotext. Type "NewPage" as the name under
"Enter AutoText entries here:", then click Add. Delete the selection, which
returns you to the original document content. Now add the following macro
to the template:
Sub InsertNewPage()
Dim oAT as Template
Set oAT = ActiveDocument.AttachedTemplate
'If your form will be protected, include the following line:
ActiveDocument.Unprotect "your password here"
Selection.EndKey Unit:=wdStory
oAT.AutoTextEntries("NewPage").Insert Where:=Selection.Range
'If your form will be protected, include the following line:
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True,
Password:="your password here"
Set oAT = Nothing
End Sub
Then, Tools>Customize>Commands. Make sure "Save in:" is set to your
template rather than Normal. Scroll the Categories on the left and select
Macros. Scroll the Commands on the right, find and select the
"InsertNewPage" macro, drag it onto one of the toolbars. Click Close. This
is better than putting a button on the form because then you'd have to worry
about how to hide it when the form is printed.
One of the potential problems with this method is that no mechanism is
provided for the user to undo the addition of pages, if they should later
find that they don't need one after all. A macro-free alternative that
might be better is this:
Select everything from the top of the form through any column headings you
may have before the line item blanks. Insert>Bookmark, type a bookmark name
like "HEADER", click Add. Right arrow once to move the selection right
after the bookmark. Insert>Break>Next Page section break. View>Header and
Footer. Click the 'Same as previous' button on the Header and Footer
toolbar to unlink the second section header from the first section header.
In the second section header, Ctrl+F9 to insert a new field. Between the
field braces { }, type "REF HEADER", so the field should look like this: {
REF HEADER }. F9 to update the field. Close the header. With your cursor
in the new section, File>PageSetup, Layout tab, change Section start to
Continuous. If you will be protecting your form, Tools>Protect Document,
click Sections button, and make sure that Section 2 is unchecked so that
users can add to or delete from their line items as needed. Take steps to
ensure that your users have Tools>Options, Print tab, 'Update fields' is
checked.
Using the solution above, when users add enough line items to wrap to a new
page, the header you created will appear on any pages after the first page.
When they print, the field in that header will automatically update to
reflect any information they filled in at the top of the first page.
Hope that helps.
Regards,
Chad
"Ramona" <anon...@discussions.microsoft.com> wrote in message
news:22b701c47017$4c71c660$a401...@phx.gbl...