Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-26-2015, 04:05 PM
Guessed's Avatar
Guessed Guessed is offline Loop and Update Content Controls with value Windows 7 32bit Loop and Update Content Controls with value Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default In that case

Try
Code:
Sub CCLoader()
  Dim aCC As ContentControl, aRng As Range
  For Each aRng In ActiveDocument.StoryRanges
    For Each aCC In aRng.ContentControls
      If aCC.Title = "aaa" Then
        aCC.Range.Text = "hi mum"
      End If
    Next aCC
  Next aRng
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop and Update Content Controls with value VBA to set Content controls as non printing Sammie0Sue Word VBA 21 01-12-2021 04:44 PM
VBA for content controls ciresuark Word VBA 1 03-10-2015 03:14 PM
Calculate Age From Content Controls kintap Word VBA 10 07-02-2014 09:25 AM
Windows update loop franklekens Windows 0 04-10-2014 11:56 PM
Loop and Update Content Controls with value Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM

Other Forums: Access Forums

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