Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-07-2013, 01:44 PM
macropod's Avatar
macropod macropod is offline Assign a value to a Content Control Windows 7 32bit Assign a value to a Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
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

The 'With .Cell(i, 2).Range.ContentControls(1)' statement occurs in a loop that starts at the first row in the table and stops at the penultimate row. The 'i' refers to the row number, the '2' refers to the column number and the '1' refers to the first ContentControl in that cell. So, if your ContentControl is not in the second column, you'll need to change the '2' (twice) and, if your table has a header row, you'll need to change:
For i = 1 To .Rows.Count - 1
to:
For i = 2 To .Rows.Count - 1

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
content controls, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a value to a Content Control Move to next content control cksm4 Word VBA 13 07-02-2019 07:48 PM
Assign a value to a Content Control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Assign a value to a Content Control Content control problem Anja Word 2 10-16-2013 09:56 AM
Assign a value to a Content Control Hierarchical content control ntjson Word VBA 1 04-04-2013 12:07 AM
Assign a value to a Content Control Content control titles jillapass Word VBA 3 05-29-2012 06:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:25 AM.


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