Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro to Paste Same Item a Specific Number of Times?
I have 4 paragraphs with specific wording. I would like to prompt the
user for the number of times they wish to copy and paste Paragraph 1, Paragraph 2, etc. and then have the macro select, copy, and paste each paragraph the specified number of times. I know I could manually copy each paragraph to the clipboard and select each paragraph every time I want to use that particular paragraph, but I'd like to find a more elegant way to do this. Suggestions? Thanks, Kathy |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro to Paste Same Item a Specific Number of Times?
Hi Kn,
I have 4 paragraphs with specific wording. I would like to prompt the user for the number of times they wish to copy and paste Paragraph 1, Paragraph 2, etc. and then have the macro select, copy, and paste each paragraph the specified number of times. I know I could manually copy each paragraph to the clipboard and select each paragraph every time I want to use that particular paragraph, but I'd like to find a more elegant way to do this. Well, the basic way to get something to happen "n" times is: For i = 1 to CLng(InputBox("How many times to repeat?)) 'Put the code to repeat here Next Note that, as it stands, this isn't full-proof. It will fail if someone doesn't type a number, for example. If you need more help with this, you should ask in the word.vba.beginners newsgroup. This group is more for end-user questions :-9 Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro button | Microsoft Word Help | |||
Autonew macro in Word to select specific record from Excel database | Mailmerge | |||
trying to copy & paste the same item multiple times on a page | Page Layout | |||
how do you make a macro execute x number of times? | Microsoft Word Help | |||
Want to Repeat Records certain number of times | Mailmerge |