![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
In the document I posted, there is a paragraph mark after the table because a document must always have at least one ordinary paragraph following the last table in the document. The same applies to tables within a content control; so how did you get your table into a content control without the terminating paragraph mark?
In any event, there are ways around this. For example: Code:
Sub DelCCTbl()
Dim Rng As Range
With ActiveDocument.ContentControls(1).Range
Set Rng = .Tables(1).Range
.Tables(1).ConvertToText
With Rng
.End = .End - 1
.Start = .Start + 1
.Delete
End With
Set Rng = Nothing
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 10-11-2013 at 11:46 PM. Reason: Updated code |
|
| Tags |
| content controls, deleting, tables |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Hierarchical content control
|
ntjson | Word VBA | 1 | 04-04-2013 12:07 AM |
Clearing content control tick box within table
|
jillapass | Word VBA | 1 | 08-08-2012 04:58 PM |
| Word2010 check boxes and plain text content control boxes in same table | fcsungard | Word | 5 | 06-01-2012 01:16 AM |
Content control titles
|
jillapass | Word VBA | 3 | 05-29-2012 06:11 AM |
| Retrieving content control value | jillapass | Word VBA | 4 | 05-24-2012 05:07 AM |