I have a data collection document with 15 pages. Each page is a unique form.
The forms are used to collect data in a data center. I need a macro that
prompts the user for the siize of the data center sq ft (0 - 5000) and then
makes multiple duplicates of each "form " in the document. For instance, for
a value of 2000 there will need to duplice page 1 twice, page 2 five times.
page 3 ten times, page 4 three times etc.
Can I create a macro that prompts for user input? Can the macro then
duplicate pages within the document.
Thanks
>I have a data collection document with 15 pages. Each page is a unique
>form.
[quoted text clipped - 6 lines]
> times.
> page 3 ten times, page 4 three times etc.
You would need to define how you would derive the number of duplicates from
the original single number.
> Can I create a macro that prompts for user input?
Yes. the simplest approach is to use an InputBox (look it up in VBA help).
if you want to get more sophisticated, use a userForm.
How to create a Userform
http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
> Can the macro then
> duplicate pages within the document.
I'd suggest saving the layout for each page as an AutoText entry. You then
insert each Autotext entry as many times as you want when creating the new
document.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Zombiewoof - 22 Aug 2006 18:00 GMT
> You would need to define how you would derive the number of duplicates from
> the original single number.
It is not complicated. There is a simple first order arithemic expression I
derived based on a data center model I creawted. I did not put this into the
original post for I thought it would be too detailed.
> > Can I create a macro that prompts for user input?
>
[quoted text clipped - 10 lines]
> insert each Autotext entry as many times as you want when creating the new
> document.
Thanks for the input. I will try the Autotext feature as well as a simple
VBA script.