![]() |
|
|
|
#1
|
||||
|
||||
|
There are numerous ways of doing this. For example, in VBA:
Code:
Sub Demo() Dim Rng As Range With ActiveDocument Set Rng = .Tables(1).Range Rng.Collapse wdCollapseEnd Rng.FormattedText = .Tables(1).Range.FormattedText End With End Sub Code:
Sub Demo() Dim Rng As Range With ActiveDocument Set Rng = .Tables(1).Range Rng.Copy Rng.Collapse wdCollapseEnd Rng.Paste End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
I implemented the code but it is still appending the table to the previous table. So Extending it not creating a brand new table which is what I want to do.
We are using VB.Net 2010 not VBA/VB6. So we are doing MyCopyFromRange = pCopyFromTable.Range ' pCopyFromTable is a parameter on the routine MyCopyFromRange.Copy MyCopyFromRange.Collapse(Word.WdCollapseDirection.wdCollapseEnd) MyCopyFromRange.Paste What does Collapse do? The previous technique I used worked on the first copy but not the second. (In the case I am working on it is trying to clone 2 tables). |
|
| Tags |
| .net, table |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
editing a number/text at one place and changes taking place wherever it appears
|
anurag.butoliya | Word | 1 | 06-14-2014 06:27 PM |
How to tell Word (2010) my Capitalization is correct
|
JRW1015 | Word | 3 | 08-13-2013 04:57 PM |
Word 2007 Tables - Shift cells backwards one place
|
bloodge1 | Word Tables | 3 | 08-28-2012 10:11 PM |
| Outlook 2010 duplicate email folders | randolsgm1 | Outlook | 1 | 07-19-2011 05:48 PM |
Duplicate holidays in Outlook 2010
|
pln@dlf.org | Outlook | 1 | 06-06-2011 11:45 AM |