![]() |
|
|
Thread Tools | Display Modes |
#10
|
|||
|
|||
![]()
So I have almost gotten through to the end, however, whenever icount >2 the table pastes next to the previous table it pasted when i need it within its own table below.
Code:
Dim i As Integer Dim iCount As Integer Dim Rng As Range iCount = InputBox("How many duplicates?", , "1") Set Rng = ActiveDocument.Bookmarks("Generator").Range If iCount = 0 Then Rng.Select Rng.Delete Else For i = iCount To 2 Step -1 Set Rng = ActiveDocument.Bookmarks("Generator").Range Rng.Select Rng.Collapse wdCollapseEnd Rng.Select Rng.Paste 'insert paragraph here Next i End If |
Tags |
copy and paste, headings, table |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking to copy select cells in table using dropdown list to paste to new table in another worksheet | CaptainRetired | Excel Programming | 18 | 01-04-2018 07:22 PM |
![]() |
Joey Cheung | Word Tables | 1 | 08-12-2014 05:15 PM |
![]() |
ezrayst93 | Word | 5 | 07-21-2014 11:06 PM |
![]() |
theheartsmaster | Word Tables | 1 | 12-10-2012 04:10 AM |
How to have this Heading – Table of contents style? | Jamal NUMAN | Word | 0 | 01-13-2011 06:02 PM |