View Single Post
 
Old 03-13-2016, 06:10 AM
highrise955 highrise955 is offline Windows 10 Office 2013
Advanced Beginner
 
Join Date: Mar 2016
Posts: 37
highrise955 is on a distinguished road
Default

Quote:
Originally Posted by highrise955 View Post
Yes, clicking and shift-tab work fine but since the users may be inputting over a couple of hundred rows I want to make it as seamless as possible.

I'm sure there must be a way to add a new table row when exiting the "Method of Inspection" CC, I just need to figure it out.

Thanks for your help.

OK, I figured it out. I just replaced this code...

Code:
With CCtrl
  'Check that the Content Control is within our table.
  If .Range.InRange(ActiveDocument.Tables(1).Range) = False Then Exit Sub
  'Get the number of ContentControls in the table
  i = .Range.Tables(1).Range.ContentControls.Count
  'Get our ContentControl's index # in the table
  j = ActiveDocument.Range(.Range.Tables(1).Range.Start, .Range.End).ContentControls.Count
  'Check that we're using the last content control
  If i <> j Then Exit Sub
'End With
...with this code...

Code:
If CCtrl.Tag <> "MethodInspect" Then Exit Sub
...and it works perfectly. Easier than I thought.
Reply With Quote