Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-31-2011, 12:19 AM
macropod's Avatar
macropod macropod is offline Move to next content control Windows 7 32bit Move to next content control Office 2000
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

Hi Brock,

The 'Exit For' was there because your post implied that you only wanted the very next Content Control, not all of them, and you didn't indicate anything about whether the next Content Control had the same tag.

Since it seems only some of the Content Controls have the 'ContainerContents' tag, it would be more efficient to do it this way:
Code:
Dim strTmp As String, i As Integer
With ActiveDocument.SelectContentControlsByTag("ContainerContents")
  For i = 1 To .Count
    strTmp = strTmp & .Item(i).Range.Text
  Next
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Content Eat up RAM Resources Tommy Word 0 08-23-2010 10:08 PM
need to grab content of certain fields? erik2000 Word 0 02-19-2010 04:19 AM
Package for CD with links to Windows media player content and Flash Shockwave content hectorh PowerPoint 4 10-15-2009 12:22 PM
Move to next content control share content between documents? albytrott Word 1 10-08-2009 08:27 AM
Templates: automatic text generation from Rich Text content control Chickenmunga Word 0 10-01-2008 11:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:14 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