Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2021, 03:37 PM
macropod's Avatar
macropod macropod is offline Help please adding a macro to add a table row to a content control table on exit Windows 10 Help please adding a macro to add a table row to a content control table on exit Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For example:


Code:
'The following code conditionally adds a new row, with content controls, to the designated tables.
Dim i As Long, j As Long, t As Long, Prot As Variant
Const Pwd As String = "" 'Insert password (if any) here
With CCtrl
  'Check that the Content Control is within our table.
  t = ActiveDocument.Range(0, CCtrl.Range.Start).Tables.Count
  Select Case t
    Case 3, 4
    Case Else: Exit Sub
  End Select
  'Get the number of ContentControls in the table
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
content control, macro help, macro in word



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Adding Rows To Table With Content Control lord_kaiser Word VBA 2 08-01-2020 01:01 AM
Help please adding a macro to add a table row to a content control table on exit Edit table in content control denise do rocio maciel Word VBA 2 01-03-2016 11:59 PM
Help please adding a macro to add a table row to a content control table on exit VBA error Content Control On Exit jec1 Word VBA 5 08-16-2014 08:14 PM
Help please adding a macro to add a table row to a content control table on exit Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Help please adding a macro to add a table row to a content control table on exit Clearing content control tick box within table jillapass Word VBA 1 08-08-2012 04:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft