Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2016, 05:08 PM
highrise955 highrise955 is offline Dropdownlist-Parsing values to various ContentControls Windows 10 Dropdownlist-Parsing values to various ContentControls Office 2013
Advanced Beginner
Dropdownlist-Parsing values to various ContentControls
 
Join Date: Mar 2016
Posts: 37
highrise955 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
In that case, I don't see any point in using the dropdown content control - you may as well directly populate all areas of the document from a dropdown on the userform. See attached demo.

Now I'm thoroughly confused. I've never used bookmarks so I guess I need to learn those to understand your example better. I understand the basics of your code but I can't seem to see how the code knows where to place the data in the document. I imagine with your example I wouldn't be using contentcontrols to house these values. Though I would still need some for the other data not related to the Drawing Number.

Can I assume I could still use my template with your example?

Thanks for the input. This is definitely a learning experience.
Reply With Quote
  #2  
Old 03-07-2016, 05:35 PM
macropod's Avatar
macropod macropod is offline Dropdownlist-Parsing values to various ContentControls Windows 7 64bit Dropdownlist-Parsing values to various ContentControls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,360
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

Quote:
Originally Posted by highrise955 View Post
I understand the basics of your code but I can't seem to see how the code knows where to place the data in the document.
The document has a series of bookmarks, which you can see via Insert|Bookmark. These are populated by the userform. The userform could just as easily populate a series of content controls.
Quote:
Originally Posted by highrise955 View Post
Can I assume I could still use my template with your example?
Having not seen your template, that's impossible to say for sure, though there's nothing about the code that would necessarily be incompatible with that.

You previously mentioned:
Quote:
SN's required (which will show as a large check symbol and eventually I would like to make it show a small table where the serial numbers can be entered, otherwise that area would be hidden)
Your userform could likewise have another listbox for the user to choose the required SN number and similar - though rather more complex - code could be used to insert the required table and its content.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-08-2016, 01:35 AM
highrise955 highrise955 is offline Dropdownlist-Parsing values to various ContentControls Windows 10 Dropdownlist-Parsing values to various ContentControls Office 2013
Advanced Beginner
Dropdownlist-Parsing values to various ContentControls
 
Join Date: Mar 2016
Posts: 37
highrise955 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
As for the "multiple values separated by the "|" symbol," what are you trying to do with them? The code you're using was written around the idea that all the output would go into a single text content control, with line breaks between the values. If you want the various values separated by the "|" symbol to be output to different text content controls, rather different code would be needed. For example:

Am I correct in assuming that the following code snippet is what would actually populate the various CC's in my form?

Code:
For i = 0 To UBound(Split(StrDetails, "|"))
      ActiveDocument.SelectContentControlsByTitle("Value" & i)(1).Range.Text = Split(StrDetails, "|")(i)
Next
If that is the case would the following hold true...

Code:
For i = 0 to UBound(Split(StrDetails, "|"))
     ActiveDocument.SelectContentControlsByTag("Value" & i)(1).Range.Text = Split(StrDetails, "|")(i)
Next
...where each CC would have the tag "Value0, Value1, Value2..." and so on? Also, can I further assume this code would be placed in the userform and not the actual document?

I really appreciate the time you are taking to assist me in this matter. I'm learning a lot and I sincerely appreciate your continuing effort.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA ppt ComboBox behaivor: 1.OnFocus change value 2. get dropdownlist doesn't disappear after mousec janism22 PowerPoint 2 03-26-2015 12:35 AM
ActiveDocument.ContentControls(ID) not working Tejas.T Word VBA 3 03-09-2015 06:50 PM
Updating grouped ContentControls in Word 2010 MGerhard Word VBA 3 08-04-2014 02:34 AM
Dropdownlist-Parsing values to various ContentControls Parsing 'FullName' column - help needed text to column ScottA Excel Programming 3 05-06-2014 12:49 PM
XML parsing & Object variable not set (Error 91) tinfanide Excel Programming 0 12-29-2011 08:43 AM

Other Forums: Access Forums

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