Duplicate pages within a document when prompted by a Macro

Z

Zombiewoof

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
 
J

Jonathan West

Zombiewoof said:
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.

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.


--
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
 
Z

Zombiewoof

:

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.
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


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.


--
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
Thanks for the input. I will try the Autotext feature as well as a simple
VBA script.
 

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