Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2014, 03:07 AM
john s. john s. is offline Retrieve Values from Content Controls for hidden Windows 7 64bit Retrieve Values from Content Controls for hidden Office 2010 64bit
Novice
Retrieve Values from Content Controls for hidden
 
Join Date: Feb 2014
Posts: 1
john s. is on a distinguished road
Default Retrieve Values from Content Controls for hidden

Hello guys



I'm trying to Retrieve from 2 Dropdown Elements the Values.

And by an certain value ( example "hidden" ) the Content control should be
hidden .

And These case sould by query independent for both Content controls.


So i think i Need 1 certain value for each Content control element.


I'm not so familar with the vba things in word ...

Edit:

So now i found some vba code :
Code:
Function getCCValue(cc As ContentControl)
Dim ccLE As ContentControlListEntry
For Each ccLE In cc.DropdownListEntries
  If ccLE.Text = cc.Range.Text Then
    getCCValue = ccLE.Value
    Exit For
  End If
Next
End Function
Thanks
I think these code ther is an Collect from all Values from the Dropdownlist's is it right ?


The i Need the Definition by cases for Dropdown list1 and Dropdown list 2.




regards John s.

Last edited by macropod; 02-21-2014 at 02:09 PM. Reason: Restructured code
Reply With Quote
  #2  
Old 02-21-2014, 02:14 PM
macropod's Avatar
macropod macropod is offline Retrieve Values from Content Controls for hidden Windows 7 32bit Retrieve Values from Content Controls for hidden Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,954
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

To retrieve the values, you'd need to compare each display text against the content control range and, when a match is achieved, query the corresponding value. You might just as well ignore the values and compare just the range's text against whatever your 'hidden' trigger is. If you're trying to work with specific content controls, give them titles and check whether ContentControl.Title matches any of those you're interested in.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve Values from Content Controls for hidden VBA to set Content controls as non printing Sammie0Sue Word VBA 21 01-12-2021 04:44 PM
Retrieve Values from Content Controls for hidden Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
Retrieve Values from Content Controls for hidden How to retrieve text from a word content control in VBA jeffaus Word VBA 1 03-14-2013 11:42 PM
Retrieve Values from Content Controls for hidden Grouping Content Controls cksm4 Word VBA 2 03-01-2011 12:46 PM
Calculations using values from date picker controls Inkarnate Word 0 06-09-2010 07:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:47 PM.


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